From 3dc0d73d65fae7ae2312a3271288aa92f2a23525 Mon Sep 17 00:00:00 2001 From: agreiner Date: Sun, 8 Aug 2021 14:41:25 +0200 Subject: [PATCH] Added Jenkins multiarch docker build --- Jenkinsfile | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 0eff3d8..2967a43 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,18 +1,15 @@ node { - def app + environment{ + IMAGENAME = "agreiner/advancedmqttbridge" + } + stage('Clone repository') { - checkout scm } - stage('Build image') { - - app = docker.build("agreiner/advancedmqttbridge") + stage('Build multiarch image') { + sh """ + docker buildx build -t reg.greinet.com/agreiner/advancedmqttbridge:latest --platform linux/amd64,linux/arm64,linux/ppc64le --push . + """ } - stage('Push image') { - docker.withRegistry('https://reg.greinet.com', 'docker_registry_jenkins') { - app.push("1.${env.BUILD_NUMBER}") - app.push("latest") - } - } - } \ No newline at end of file +} \ No newline at end of file