From 04cf6d2bc2f57818bb17a9c33119b60036fe4d88 Mon Sep 17 00:00:00 2001 From: dany Date: Fri, 16 Sep 2022 16:40:43 +0200 Subject: [PATCH] Update 'Jenkinsfile' --- Jenkinsfile | 35 ++++++++++------------------------- 1 file changed, 10 insertions(+), 25 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 82f8b8e..cb4a4e9 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -30,7 +30,7 @@ pipeline{ } stages { - stage('Build latest') { + stage('Build all') { steps { sshCommand remote: remote, command: ''' set -e @@ -41,30 +41,15 @@ pipeline{ cp /var/jenkins_home/workspace/nightly-antosaio/build/* antos -rf tree antos docker run --rm --privileged docker/binfmt:a7996909642ee92942dcd6cff44b9b95f08dad64 - docker buildx build \ - --push \ - --build-arg tag=latest \ - --platform linux/arm/v7,linux/arm64/v8,linux/amd64 \ - --tag xsangle/antosaio:latest . - ''' - } - } - stage('Build devel') { - steps { - sshCommand remote: remote, command: ''' - set -e - export WORKSPACE=$(realpath "./jenkins/workspace/antosaio-docker") - cd $WORKSPACE - [ -d antos ] && rm -rf antos - mkdir antos - cp /var/jenkins_home/workspace/nightly-antosaio/build/* antos -rf - tree antos - docker run --rm --privileged docker/binfmt:a7996909642ee92942dcd6cff44b9b95f08dad64 - docker buildx build \ - --push \ - --build-arg tag=devel \ - --platform linux/arm/v7,linux/arm64/v8,linux/amd64 \ - --tag xsangle/antosaio:devel . + for dir in antos/* ; do + tag=$(basename $dir) + echo "BUILD TAG $tag" + docker buildx build \ + --push \ + --build-arg tag=$tag \ + --platform linux/arm/v7,linux/arm64/v8,linux/amd64 \ + --tag xsangle/antosaio:$tag . + done ''' } }