build docker image for multi arch
Some checks failed
mapguesser/pipeline/pr-develop There was a failure building this commit

This commit is contained in:
Bence Pőcze 2023-09-26 01:14:17 +02:00
parent fc6141e2b9
commit a8879f4326
Signed by: bence
GPG Key ID: DC5BD6E95A333E6D

16
Jenkinsfile vendored
View File

@ -70,15 +70,15 @@ pipeline {
def version = sh(script: 'git describe --tags --always --match "Release_*" HEAD', returnStdout: true).trim() def version = sh(script: 'git describe --tags --always --match "Release_*" HEAD', returnStdout: true).trim()
def imageUrl = "git.esoko.eu/esoko/mapguesser:${version}" def imageUrl = "git.esoko.eu/esoko/mapguesser:${version}"
sh script: """docker buildx build \
-t ${imageUrl} \
-f docker/Dockerfile \
--target mapg_release \
.""",
label: 'Build Docker image'
withDockerRegistry([credentialsId: 'gitea-system-user', url: 'https://git.esoko.eu/']) { withDockerRegistry([credentialsId: 'gitea-system-user', url: 'https://git.esoko.eu/']) {
sh script: "docker push ${imageUrl}", label: 'Push Docker image to registry' sh script: """docker buildx build \
--platform linux/amd64,linux/arm64 \
-f docker/Dockerfile \
--target mapg_release \
-t ${imageUrl} \
--push \
.""",
label: 'Build Docker image'
} }
} }
} }