From 60d36ca64f43167595077edff287d7ef29eb3b60 Mon Sep 17 00:00:00 2001 From: Runar Borge Date: Thu, 9 Jul 2020 23:09:21 +0200 Subject: T1927: arm: Readd CI build of emulated ARM64 container After a successfull CI build of this container it is considered working and is possible to add back to the build as a standard target. The container is changed so it handles an architecture change without changing the dockerfile --- Jenkinsfile | 43 ++++++++++++++++++------------------------- 1 file changed, 18 insertions(+), 25 deletions(-) (limited to 'Jenkinsfile') diff --git a/Jenkinsfile b/Jenkinsfile index c2ec90a5..17f0ca51 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -49,11 +49,7 @@ node('Docker') { script { dir('docker') { sh """ - mkdir -p x86-64 - cp Dockerfile x86-64/Dockerfile - cp entrypoint.sh x86-64/entrypoint.sh - - docker build -t ${env.DOCKER_IMAGE} x86-64 + docker build -t ${env.DOCKER_IMAGE} . """ if ( ! isCustomBuild()) { withDockerRegistry([credentialsId: "DockerHub"]) { @@ -81,26 +77,23 @@ node('Docker') { // } // } // }, -// 'arm64': { -// script { -// dir('docker') { -// sh """ -// cp Dockerfile arm64/Dockerfile -// cp entrypoint.sh arm64/entrypoint.sh -// sed -i 's#^FROM.*#FROM multiarch/debian-debootstrap:arm64-buster-slim#' arm64/Dockerfile -// docker build -t ${env.DOCKER_IMAGE_ARM64} arm64 -// -// """ -// -// if ( ! isCustomBuild()) { -// withDockerRegistry([credentialsId: "DockerHub"]) { -// sh "docker push ${env.DOCKER_IMAGE_ARM64}" -// -// } -// } -// } -// } -// } + 'arm64': { + script { + dir('docker') { + sh """ + docker build -t ${env.DOCKER_IMAGE_ARM64} --build-arg ARCH=arm64v8/ . + + """ + + if ( ! isCustomBuild()) { + withDockerRegistry([credentialsId: "DockerHub"]) { + sh "docker push ${env.DOCKER_IMAGE_ARM64}" + + } + } + } + } + } ) } } -- cgit v1.2.3