Fix CI pipeline

This commit is contained in:
Jamie Curnow 2018-05-03 15:56:35 +10:00
parent 31ab201175
commit c7852125a8

12
Jenkinsfile vendored
View File

@ -39,12 +39,9 @@ node-prune```
} }
stage('Build') { stage('Build') {
steps { steps {
TAG_VERSION = sh ( def TAG_VERSION = getPackageVersion()
script: 'docker run --rm -v $(pwd)/manager:/data ${DOCKER_CI_TOOLS} bash -c "cat /data/package.json|jq -r \'.version\'"',
returnStdout: true
).trim()
sh '''docker build -t ${TEMP_IMAGE_NAME} . sh '''docker build -t $TEMP_IMAGE_NAME .
exit $?''' exit $?'''
} }
} }
@ -80,3 +77,8 @@ exit $?'''
} }
} }
} }
def getPackageVersion() {
ver = sh(script: 'docker run --rm -v $(pwd)/manager:/data $DOCKER_CI_TOOLS bash -c "cat /data/package.json|jq -r \'.version\'"', returnStdout: true)
return ver.trim()
}