build docker image for multi arch
Some checks failed
mapguesser/pipeline/pr-develop There was a failure building this commit
Some checks failed
mapguesser/pipeline/pr-develop There was a failure building this commit
This commit is contained in:
parent
fc6141e2b9
commit
a8879f4326
16
Jenkinsfile
vendored
16
Jenkinsfile
vendored
@ -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'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user