diff --git a/Jenkinsfile b/Jenkinsfile index 97e861e..6579b7c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -42,6 +42,9 @@ pipeline { } } stage('Build docker image') { + when { + branch 'main' + } steps { echo 'Building image' script { @@ -52,6 +55,9 @@ pipeline { } } stage('Push image to container registry') { + when { + branch 'main' + } steps { echo 'Pushing image to registry' script { @@ -64,6 +70,9 @@ pipeline { } } stage('Notify CD script') { + when { + branch 'main' + } steps { echo 'Triggering deploy webhook' script {