Skip to content

Commit 4f7bd7e

Browse files
authored
Create nodesjs file
1 parent 1f224ef commit 4f7bd7e

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

vars/nodesjs file

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
node{
2+
stage('CodeCheckout'){
3+
sh "echo running ebay nodeJS project"
4+
git 'https://github.com/LandmakTechnology/nodejs-application'
5+
}
6+
stage('UnitTest'){
7+
//sh "npm test"
8+
}
9+
stage('Build'){
10+
sh "echo creating build artifacts"
11+
nodejs(nodeJSInstallationName: 'nodejs17') {
12+
sh 'npm install'
13+
}
14+
}
15+
stage('Quality'){
16+
sh "echo CodeQualityReport"
17+
nodejs(nodeJSInstallationName: 'nodejs17') {
18+
sh 'npm run sonar'
19+
}
20+
}
21+
stage('UploadArtifacts'){
22+
sh "echo npm packages uploaded"
23+
nodejs(nodeJSInstallationName: 'nodejs17') {
24+
//sh 'npm publish'
25+
// Jenkins nexus intergration
26+
// password = admin123 username = admin
27+
// echo -n 'admin:admin123' | openssl base64
28+
}
29+
}
30+
31+
stage('deployment'){
32+
sh "echo Deploying applications"
33+
nodejs(nodeJSInstallationName: 'nodejs17') {
34+
sh 'npm start'
35+
}
36+
}
37+
}

0 commit comments

Comments
 (0)