forked from LandmakTechnology/nodejs-application
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfileScripted
More file actions
38 lines (30 loc) · 727 Bytes
/
JenkinsfileScripted
File metadata and controls
38 lines (30 loc) · 727 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
node
{
stage("CheckOutCodeGit")
{
git branch: 'master', credentialsId: '65fb834f-a83b-4fe7-8e11-686245c47a65', url: 'https://github.com/bhaskar0504/node-js-application.git'
}
stage("Build")
{
nodejs(nodeJSInstallationName: 'nodejs15.2.1') {
sh 'npm install'
}
}
stage('ExecuteSonarQubeReport') {
nodejs(nodeJSInstallationName: 'nodejs15.2.1') {
sh 'npm run sonar'
}
}
stage('UploadintoNexus') {
nodejs(nodeJSInstallationName: 'nodejs15.2.1') {
sh 'npm publish'
}
}
stage('RunNodeJsApp')
{
//sh "./scripts/run.sh"
nodejs(nodeJSInstallationName: 'nodejs15.2.1') {
sh 'npm start &'
}
}
}