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
4
Jenkinsfile
vendored
4
Jenkinsfile
vendored
|
|
@ -49,18 +49,22 @@ pipeline {
|
||||||
stage('Build docker image') {
|
stage('Build docker image') {
|
||||||
steps {
|
steps {
|
||||||
echo 'Building image'
|
echo 'Building image'
|
||||||
|
script{
|
||||||
docker.build("${OWNER}/${IMAGE_NAME}:${TAG}")
|
docker.build("${OWNER}/${IMAGE_NAME}:${TAG}")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
stage('Push image to container registry') {
|
stage('Push image to container registry') {
|
||||||
steps {
|
steps {
|
||||||
echo 'Pushing image to registry'
|
echo 'Pushing image to registry'
|
||||||
|
script{
|
||||||
docker.withRegistry(REGISTRY_URL, GITEA_CREDS){
|
docker.withRegistry(REGISTRY_URL, GITEA_CREDS){
|
||||||
docker.image("${OWNER}/${IMAGE_NAME}:${TAG}").push()
|
docker.image("${OWNER}/${IMAGE_NAME}:${TAG}").push()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
post {
|
post {
|
||||||
always {
|
always {
|
||||||
echo 'This will always run'
|
echo 'This will always run'
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue