This commit is contained in:
Jamie Curnow 2018-07-30 16:51:43 +10:00
parent 9fbfb1648b
commit 3119c3f576

13
Jenkinsfile vendored
View File

@ -6,6 +6,7 @@ pipeline {
agent any
environment {
IMAGE_NAME = "nginx-proxy-manager"
BASE_IMAGE_NAME = "jc21/nginx-proxy-manager-base"
TEMP_IMAGE_NAME = "nginx-proxy-manager-build_${BUILD_NUMBER}"
TEMP_IMAGE_NAME_ARM = "nginx-proxy-manager-arm-build_${BUILD_NUMBER}"
//TAG_VERSION = getPackageVersion()
@ -23,10 +24,10 @@ pipeline {
steps {
ansiColor('xterm') {
// Codebase
sh 'docker run --rm -v $(pwd):/srv/app -w /srv/app $IMAGE_NAME-base:latest yarn --registry=$NPM_REGISTRY install'
sh 'docker run --rm -v $(pwd):/srv/app -w /srv/app $IMAGE_NAME-base:latest npm runscript build'
sh 'docker run --rm -v $(pwd):/srv/app -w /srv/app $BASE_IMAGE_NAME:latest yarn --registry=$NPM_REGISTRY install'
sh 'docker run --rm -v $(pwd):/srv/app -w /srv/app $BASE_IMAGE_NAME:latest npm runscript build'
sh 'rm -rf node_modules'
sh 'docker run --rm -v $(pwd):/srv/app -w /srv/app $IMAGE_NAME-base:latest yarn --registry=$NPM_REGISTRY install --prod'
sh 'docker run --rm -v $(pwd):/srv/app -w /srv/app $BASE_IMAGE_NAME:latest yarn --registry=$NPM_REGISTRY install --prod'
sh 'docker run --rm -v $(pwd):/data $DOCKER_CI_TOOLS node-prune'
// Docker Build
@ -55,10 +56,10 @@ pipeline {
steps {
ansiColor('xterm') {
// Codebase
sh 'docker run --rm -v $(pwd):/srv/app -w /srv/app $IMAGE_NAME-base:armhf yarn --registry=$NPM_REGISTRY install'
sh 'docker run --rm -v $(pwd):/srv/app -w /srv/app $IMAGE_NAME-base:armhf npm runscript build'
sh 'docker run --rm -v $(pwd):/srv/app -w /srv/app $BASE_IMAGE_NAME:armhf yarn --registry=$NPM_REGISTRY install'
sh 'docker run --rm -v $(pwd):/srv/app -w /srv/app $BASE_IMAGE_NAME:armhf npm runscript build'
sh 'rm -rf node_modules'
sh 'docker run --rm -v $(pwd):/srv/app -w /srv/app $IMAGE_NAME-base:armhf yarn --registry=$NPM_REGISTRY install --prod'
sh 'docker run --rm -v $(pwd):/srv/app -w /srv/app $BASE_IMAGE_NAME:armhf yarn --registry=$NPM_REGISTRY install --prod'
// Docker Build
sh 'docker build --pull --no-cache --squash --compress -t TEMP_IMAGE_NAME_ARM .'