summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-06-26 17:13:41 +0200
committerGitHub <noreply@github.com>2021-06-26 17:13:41 +0200
commit346a235c00b8f7a6cd33706b420204b64da1366c (patch)
tree55d0e85b259309eff2b3f91837d9344e545b27ef
parent848f1c917efc292d854c3a35df12b7904730b089 (diff)
downloadvyos-build-346a235c00b8f7a6cd33706b420204b64da1366c.tar.gz
vyos-build-346a235c00b8f7a6cd33706b420204b64da1366c.zip
Jenkins: make arm64 dockerbuild a dedicated execution path
-rw-r--r--Jenkinsfile63
1 files changed, 30 insertions, 33 deletions
diff --git a/Jenkinsfile b/Jenkinsfile
index 1438da84..cea7ad9d 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -51,39 +51,36 @@ node('Docker') {
}
}
},
-// 'armhf': {
-// script {
-// dir('docker') {
-// sh """
-// cp Dockerfile armhf/Dockerfile
-// cp entrypoint.sh armhf/entrypoint.sh
-// sed -i 's#^FROM.*#FROM multiarch/debian-debootstrap:armhf-buster-slim#' armhf/Dockerfile
-// docker build -t ${env.DOCKER_IMAGE_ARM} armhf
-// """
-// if (! isCustomBuild()) {
-// withDockerRegistry([credentialsId: "DockerHub"]) {
-// sh "docker push ${env.DOCKER_IMAGE_ARM}"
-// }
-// }
-// }
-// }
-// },
-// '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}"
-// }
-// }
-// }
-// }
-// }
+ )
+ }
+ stage('Build timestamp') {
+ script {
+ env.TIMESTAMP = sh(returnStdout: true, script: 'date +%Y%m%d%H%M').toString().trim()
+ }
+ }
+}
+
+node('ec2_arm64') {
+ stage('Fetch') {
+ git branch: getGitBranchName(),
+ url: getGitRepoURL()
+ }
+ stage('Build Docker container') {
+ parallel (
+ '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}"
+ }
+ }
+ }
+ }
+ },
)
}
stage('Build timestamp') {