jenkinsfile update
This commit is contained in:
9
Jenkinsfile
vendored
9
Jenkinsfile
vendored
@@ -37,6 +37,7 @@ pipeline {
|
|||||||
if (hasChanges) {
|
if (hasChanges) {
|
||||||
echo "package.json changed, running npm install"
|
echo "package.json changed, running npm install"
|
||||||
currentBuild.result = 'SUCCESS'
|
currentBuild.result = 'SUCCESS'
|
||||||
|
sh 'npm install'
|
||||||
} else {
|
} else {
|
||||||
echo "package.json not changed, skipping npm install"
|
echo "package.json not changed, skipping npm install"
|
||||||
currentBuild.result = 'SUCCESS'
|
currentBuild.result = 'SUCCESS'
|
||||||
@@ -44,14 +45,6 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Install Dependencies') {
|
|
||||||
when {
|
|
||||||
expression { currentBuild.result == 'SUCCESS' }
|
|
||||||
}
|
|
||||||
steps {
|
|
||||||
sh 'npm install'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage('Run Tests') {
|
stage('Run Tests') {
|
||||||
steps {
|
steps {
|
||||||
sh 'npm test'
|
sh 'npm test'
|
||||||
|
|||||||
Reference in New Issue
Block a user