Wrapped docker commands in script blocks
Some checks failed
Amarillo/amarillo-gitea/amarillo-core/pipeline/head There was a failure building this commit
Some checks failed
Amarillo/amarillo-gitea/amarillo-core/pipeline/head There was a failure building this commit
This commit is contained in:
parent
7b53fb1479
commit
5c567d2707
10
Jenkinsfile
vendored
10
Jenkinsfile
vendored
|
|
@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue