Disabled arm CI for now

This commit is contained in:
Jamie Curnow 2018-07-27 08:36:09 +10:00
parent a1c0ad3e6d
commit 9abfdb0a92

42
Jenkinsfile vendored
View File

@ -1,5 +1,3 @@
// for arm building: https://resin.io/blog/building-arm-containers-on-any-x86-machine-even-dockerhub/
pipeline { pipeline {
options { options {
buildDiscarder(logRotator(numToKeepStr: '10')) buildDiscarder(logRotator(numToKeepStr: '10'))
@ -22,7 +20,7 @@ pipeline {
steps { steps {
ansiColor('xterm') { ansiColor('xterm') {
sh 'docker run --rm -v $(pwd):/srv/app -w /srv/app jc21/node:latest yarn --registry=$NPM_REGISTRY install' sh 'docker run --rm -v $(pwd):/srv/app -w /srv/app jc21/node:latest yarn --registry=$NPM_REGISTRY install'
sh 'docker run --rm -v $(pwd):/srv/app -w /srv/app jc21/node:latest npm run-script build' sh 'docker run --rm -v $(pwd):/srv/app -w /srv/app jc21/node:latest npm runscript build'
sh 'rm -rf node_modules' sh 'rm -rf node_modules'
sh 'docker run --rm -v $(pwd):/srv/app -w /srv/app jc21/node yarn --registry=$NPM_REGISTRY install --prod' sh 'docker run --rm -v $(pwd):/srv/app -w /srv/app jc21/node yarn --registry=$NPM_REGISTRY install --prod'
sh 'docker run --rm -v $(pwd):/data $DOCKER_CI_TOOLS node-prune' sh 'docker run --rm -v $(pwd):/data $DOCKER_CI_TOOLS node-prune'
@ -30,18 +28,18 @@ pipeline {
} }
} }
} }
stage('Build armhf') { //stage('Build armhf') {
steps { // steps {
ansiColor('xterm') { // ansiColor('xterm') {
sh 'docker run --rm -v $(pwd):/srv/app -w /srv/app jc21/node:armhf yarn --registry=$NPM_REGISTRY install' // sh 'docker run --rm -v $(pwd):/srv/app -w /srv/app jc21/node:armhf yarn --registry=$NPM_REGISTRY install'
sh 'docker run --rm -v $(pwd):/srv/app -w /srv/app jc21/node:armhf npm run-script build' // sh 'docker run --rm -v $(pwd):/srv/app -w /srv/app jc21/node:armhf npm run-script build'
sh 'rm -rf node_modules' // sh 'rm -rf node_modules'
sh 'docker run --rm -v $(pwd):/srv/app -w /srv/app jc21/node:armhf yarn --registry=$NPM_REGISTRY install --prod' // sh 'docker run --rm -v $(pwd):/srv/app -w /srv/app jc21/node:armhf yarn --registry=$NPM_REGISTRY install --prod'
sh 'docker run --rm -v $(pwd):/data $DOCKER_CI_TOOLS node-prune' // sh 'docker run --rm -v $(pwd):/data $DOCKER_CI_TOOLS node-prune'
sh 'docker build --pull --no-cache --squash --compress -t $TEMP_IMAGE_NAME_ARM -f Dockerfile.armhf .' // sh 'docker build --pull --no-cache --squash --compress -t $TEMP_IMAGE_NAME_ARM -f Dockerfile.armhf .'
} // }
} // }
} //}
stage('Publish Private') { stage('Publish Private') {
steps { steps {
sh 'docker tag $TEMP_IMAGE_NAME ${DOCKER_PRIVATE_REGISTRY}/$IMAGE_NAME:$TAG_VERSION' sh 'docker tag $TEMP_IMAGE_NAME ${DOCKER_PRIVATE_REGISTRY}/$IMAGE_NAME:$TAG_VERSION'
@ -61,16 +59,16 @@ pipeline {
sh 'docker tag $TEMP_IMAGE_NAME docker.io/jc21/$IMAGE_NAME:latest' sh 'docker tag $TEMP_IMAGE_NAME docker.io/jc21/$IMAGE_NAME:latest'
sh 'docker tag $TEMP_IMAGE_NAME docker.io/jc21/$IMAGE_NAME:$TAG_VERSION' sh 'docker tag $TEMP_IMAGE_NAME docker.io/jc21/$IMAGE_NAME:$TAG_VERSION'
sh 'docker tag $TEMP_IMAGE_NAME_ARM docker.io/jc21/$IMAGE_NAME:latest-armhf' //sh 'docker tag $TEMP_IMAGE_NAME_ARM docker.io/jc21/$IMAGE_NAME:latest-armhf'
sh 'docker tag $TEMP_IMAGE_NAME_ARM docker.io/jc21/$IMAGE_NAME:$TAG_VERSION-armhf' //sh 'docker tag $TEMP_IMAGE_NAME_ARM docker.io/jc21/$IMAGE_NAME:$TAG_VERSION-armhf'
withCredentials([usernamePassword(credentialsId: 'jc21-dockerhub', passwordVariable: 'dpass', usernameVariable: 'duser')]) { withCredentials([usernamePassword(credentialsId: 'jc21-dockerhub', passwordVariable: 'dpass', usernameVariable: 'duser')]) {
sh "docker login -u '${duser}' -p '${dpass}'" sh "docker login -u '${duser}' -p '${dpass}'"
sh 'docker push docker.io/jc21/$IMAGE_NAME:latest' sh 'docker push docker.io/jc21/$IMAGE_NAME:latest'
sh 'docker push docker.io/jc21/$IMAGE_NAME:$TAG_VERSION' sh 'docker push docker.io/jc21/$IMAGE_NAME:$TAG_VERSION'
sh 'docker push docker.io/jc21/$IMAGE_NAME:latest-armhf' //sh 'docker push docker.io/jc21/$IMAGE_NAME:latest-armhf'
sh 'docker push docker.io/jc21/$IMAGE_NAME:$TAG_VERSION-armhf' //sh 'docker push docker.io/jc21/$IMAGE_NAME:$TAG_VERSION-armhf'
} }
} }
} }
@ -82,12 +80,12 @@ pipeline {
sh 'docker tag $TEMP_IMAGE_NAME ${DOCKER_PRIVATE_REGISTRY}/$IMAGE_NAME:preview' sh 'docker tag $TEMP_IMAGE_NAME ${DOCKER_PRIVATE_REGISTRY}/$IMAGE_NAME:preview'
sh 'docker push ${DOCKER_PRIVATE_REGISTRY}/$IMAGE_NAME:preview' sh 'docker push ${DOCKER_PRIVATE_REGISTRY}/$IMAGE_NAME:preview'
sh 'docker tag $TEMP_IMAGE_NAME docker.io/jc21/$IMAGE_NAME:preview' sh 'docker tag $TEMP_IMAGE_NAME docker.io/jc21/$IMAGE_NAME:preview'
sh 'docker tag $TEMP_IMAGE_NAME_ARM docker.io/jc21/$IMAGE_NAME:preview-armhf' //sh 'docker tag $TEMP_IMAGE_NAME_ARM docker.io/jc21/$IMAGE_NAME:preview-armhf'
withCredentials([usernamePassword(credentialsId: 'jc21-dockerhub', passwordVariable: 'dpass', usernameVariable: 'duser')]) { withCredentials([usernamePassword(credentialsId: 'jc21-dockerhub', passwordVariable: 'dpass', usernameVariable: 'duser')]) {
sh "docker login -u '${duser}' -p '${dpass}'" sh "docker login -u '${duser}' -p '${dpass}'"
sh 'docker push docker.io/jc21/$IMAGE_NAME:preview' sh 'docker push docker.io/jc21/$IMAGE_NAME:preview'
sh 'docker push docker.io/jc21/$IMAGE_NAME:preview-armhf' //sh 'docker push docker.io/jc21/$IMAGE_NAME:preview-armhf'
} }
} }
} }
@ -106,7 +104,7 @@ pipeline {
} }
always { always {
sh 'docker rmi $TEMP_IMAGE_NAME' sh 'docker rmi $TEMP_IMAGE_NAME'
sh 'docker rmi $TEMP_IMAGE_NAME_ARM' //sh 'docker rmi $TEMP_IMAGE_NAME_ARM'
} }
} }
} }