Mise à jour de 'Jenkinsfile'

This commit is contained in:
dany 2022-08-07 00:16:32 +02:00
parent f0ea35c768
commit ee8f3adf45

5
Jenkinsfile vendored
View File

@ -31,15 +31,16 @@ pipeline{
steps { steps {
sshCommand remote: remote, command: ''' sshCommand remote: remote, command: '''
set -e set -e
set -x
export WORKSPACE=$(realpath "./jenkins/workspace/ci-image") export WORKSPACE=$(realpath "./jenkins/workspace/ci-image")
cd $WORKSPACE cd $WORKSPACE
# docker rmi -f $(docker images -f "dangling=true" -q) # docker rmi -f $(docker images -f "dangling=true" -q)
docker run --rm --privileged docker/binfmt:a7996909642ee92942dcd6cff44b9b95f08dad64 docker run --rm --privileged docker/binfmt:a7996909642ee92942dcd6cff44b9b95f08dad64
for arch in arm arm64 amd64 386; do for arch in arm arm64 amd64 linux/386; do
echo "build for architecture $arch" echo "build for architecture $arch"
docker buildx build \ docker buildx build \
--platform $arch \ --platform $arch \
--output "type=docker,push=false,name=xsangle/ci-tools:latest-$arch" \ --output "type=docker,push=false,name=xsangle/ci-tools:latest-${arch//\//-}" \
. .
docker tag xsangle/ci-tools:latest-$arch workstation:5000/xsangle/ci-tools:latest-$arch docker tag xsangle/ci-tools:latest-$arch workstation:5000/xsangle/ci-tools:latest-$arch
docker push workstation:5000/xsangle/ci-tools:latest-$arch docker push workstation:5000/xsangle/ci-tools:latest-$arch