Only deploy from main branch
All checks were successful
Amarillo/amarillo-gitea/amarillo-core/pipeline/head This commit looks good
All checks were successful
Amarillo/amarillo-gitea/amarillo-core/pipeline/head This commit looks good
This commit is contained in:
parent
08e0c545a1
commit
5aee8b9ecf
9
Jenkinsfile
vendored
9
Jenkinsfile
vendored
|
|
@ -42,6 +42,9 @@ pipeline {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Build docker image') {
|
stage('Build docker image') {
|
||||||
|
when {
|
||||||
|
branch 'main'
|
||||||
|
}
|
||||||
steps {
|
steps {
|
||||||
echo 'Building image'
|
echo 'Building image'
|
||||||
script {
|
script {
|
||||||
|
|
@ -52,6 +55,9 @@ pipeline {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Push image to container registry') {
|
stage('Push image to container registry') {
|
||||||
|
when {
|
||||||
|
branch 'main'
|
||||||
|
}
|
||||||
steps {
|
steps {
|
||||||
echo 'Pushing image to registry'
|
echo 'Pushing image to registry'
|
||||||
script {
|
script {
|
||||||
|
|
@ -64,6 +70,9 @@ pipeline {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Notify CD script') {
|
stage('Notify CD script') {
|
||||||
|
when {
|
||||||
|
branch 'main'
|
||||||
|
}
|
||||||
steps {
|
steps {
|
||||||
echo 'Triggering deploy webhook'
|
echo 'Triggering deploy webhook'
|
||||||
script {
|
script {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue