set runner user of web service #79
18
Jenkinsfile
vendored
18
Jenkinsfile
vendored
@ -67,18 +67,16 @@ pipeline {
|
|||||||
script {
|
script {
|
||||||
sh script: 'git clean -ffdx', label: 'Clean repository'
|
sh script: 'git clean -ffdx', label: 'Clean repository'
|
||||||
|
|
||||||
def version = sh(script: 'git describe --tags --always --match "Release_*" HEAD', returnStdout: true).trim()
|
env.VERSION = sh(script: 'git describe --tags --always --match "Release_*" HEAD', returnStdout: true).trim()
|
||||||
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 \
|
||||||
|
-f docker/Dockerfile \
|
||||||
|
--target mapg_release \
|
||||||
|
-t git.esoko.eu/esoko/mapguesser:${env.VERSION} \
|
||||||
|
--push \
|
||||||
|
.""",
|
||||||
|
label: 'Build Docker image'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user