Wrapped docker commands in script blocks
Some checks failed
Amarillo/amarillo-gitea/amarillo-core/pipeline/head There was a failure building this commit

This commit is contained in:
Csaba 2023-12-20 12:04:56 +01:00
parent 7b53fb1479
commit 5c567d2707

10
Jenkinsfile vendored
View file

@ -49,14 +49,18 @@ pipeline {
stage('Build docker image') {
steps {
echo 'Building image'
docker.build("${OWNER}/${IMAGE_NAME}:${TAG}")
script{
docker.build("${OWNER}/${IMAGE_NAME}:${TAG}")
}
}
}
stage('Push image to container registry') {
steps {
echo 'Pushing image to registry'
docker.withRegistry(REGISTRY_URL, GITEA_CREDS){
docker.image("${OWNER}/${IMAGE_NAME}:${TAG}").push()
script{
docker.withRegistry(REGISTRY_URL, GITEA_CREDS){
docker.image("${OWNER}/${IMAGE_NAME}:${TAG}").push()
}
}
}
}