Updated CI

This commit is contained in:
Jamie Curnow 2018-07-31 09:09:20 +10:00
parent 36b014aa47
commit 673cfb0027

9
Jenkinsfile vendored
View File

@ -18,6 +18,7 @@ pipeline {
branch 'master' branch 'master'
} }
steps { steps {
ansiColor('xterm') {
// Codebase // Codebase
sh 'docker pull jc21/$IMAGE_NAME-base' sh 'docker pull jc21/$IMAGE_NAME-base'
sh 'docker run --rm -v $(pwd)/manager:/srv/manager -w /srv/manager jc21/$IMAGE_NAME-base yarn --registry=$NPM_REGISTRY install' sh 'docker run --rm -v $(pwd)/manager:/srv/manager -w /srv/manager jc21/$IMAGE_NAME-base yarn --registry=$NPM_REGISTRY install'
@ -48,6 +49,7 @@ pipeline {
sh 'docker rmi $TEMP_IMAGE_NAME' sh 'docker rmi $TEMP_IMAGE_NAME'
} }
} }
}
stage('armhf') { stage('armhf') {
when { when {
branch 'master' branch 'master'
@ -56,6 +58,7 @@ pipeline {
label 'armhf' label 'armhf'
} }
steps { steps {
ansiColor('xterm') {
// Codebase // Codebase
sh 'docker pull jc21/$IMAGE_NAME-base:armhf' sh 'docker pull jc21/$IMAGE_NAME-base:armhf'
sh 'docker run --rm -v $(pwd)/manager:/srv/manager -w /srv/manager jc21/$IMAGE_NAME-base:armhf yarn --registry=$NPM_REGISTRY install' sh 'docker run --rm -v $(pwd)/manager:/srv/manager -w /srv/manager jc21/$IMAGE_NAME-base:armhf yarn --registry=$NPM_REGISTRY install'
@ -89,13 +92,14 @@ pipeline {
} }
} }
} }
}
post { post {
success { success {
slackSend color: "#72c900", message: "SUCCESS: <${BUILD_URL}|${JOB_NAME}> build #${BUILD_NUMBER} - ${currentBuild.durationString}" juxtapose event: 'success'
sh 'figlet "SUCCESS"' sh 'figlet "SUCCESS"'
} }
failure { failure {
slackSend color: "#d61111", message: "FAILED: <${BUILD_URL}|${JOB_NAME}> build #${BUILD_NUMBER} - ${currentBuild.durationString}" juxtapose event: 'failure'
sh 'figlet "FAILURE"' sh 'figlet "FAILURE"'
} }
} }
@ -105,3 +109,4 @@ 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) 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() return ver.trim()
} }