From 9abfdb0a9287f46862ee0a0a060e1f1daa875838 Mon Sep 17 00:00:00 2001 From: Jamie Curnow Date: Fri, 27 Jul 2018 08:36:09 +1000 Subject: [PATCH] Disabled arm CI for now --- Jenkinsfile | 42 ++++++++++++++++++++---------------------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 280bef87..43bf21ff 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,5 +1,3 @@ -// for arm building: https://resin.io/blog/building-arm-containers-on-any-x86-machine-even-dockerhub/ - pipeline { options { buildDiscarder(logRotator(numToKeepStr: '10')) @@ -22,7 +20,7 @@ pipeline { steps { 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 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 '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' @@ -30,18 +28,18 @@ pipeline { } } } - stage('Build armhf') { - steps { - 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 npm run-script build' - 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):/data $DOCKER_CI_TOOLS node-prune' - sh 'docker build --pull --no-cache --squash --compress -t $TEMP_IMAGE_NAME_ARM -f Dockerfile.armhf .' - } - } - } + //stage('Build armhf') { + // steps { + // 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 npm run-script build' + // 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):/data $DOCKER_CI_TOOLS node-prune' + // sh 'docker build --pull --no-cache --squash --compress -t $TEMP_IMAGE_NAME_ARM -f Dockerfile.armhf .' + // } + // } + //} stage('Publish Private') { steps { 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:$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:$TAG_VERSION-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' withCredentials([usernamePassword(credentialsId: 'jc21-dockerhub', passwordVariable: 'dpass', usernameVariable: 'duser')]) { sh "docker login -u '${duser}' -p '${dpass}'" 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:latest-armhf' - sh 'docker push docker.io/jc21/$IMAGE_NAME:$TAG_VERSION-armhf' + //sh 'docker push docker.io/jc21/$IMAGE_NAME:latest-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 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_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')]) { 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-armhf' + //sh 'docker push docker.io/jc21/$IMAGE_NAME:preview-armhf' } } } @@ -106,7 +104,7 @@ pipeline { } always { sh 'docker rmi $TEMP_IMAGE_NAME' - sh 'docker rmi $TEMP_IMAGE_NAME_ARM' + //sh 'docker rmi $TEMP_IMAGE_NAME_ARM' } } }