Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable ci-skip in multibranch pipeline not found #11

Open
aliasmee opened this issue Jun 5, 2018 · 5 comments
Open

Enable ci-skip in multibranch pipeline not found #11

aliasmee opened this issue Jun 5, 2018 · 5 comments

Comments

@aliasmee
Copy link

aliasmee commented Jun 5, 2018

hi, jenkins-ci-skip-plugin is not support multibranch pipeline?
thanks.

@PAlkisP
Copy link

PAlkisP commented Sep 5, 2018

Any update on this?

@comfroels
Copy link

This would be super helpful

@archagy
Copy link

archagy commented Oct 10, 2019

any idea on how to skip a build on a multi branch project ?

@archagy
Copy link

archagy commented Oct 11, 2019

I found a solution on this blog http://adar.me/blog/2017/04/10/skipping-builds-in-a-multi-branch-job/ the syntax is old (because 2017), Here is my updated version of this solution.

def shouldBuild = "true"
pipeline{ ....

        stage('Skip Build') {
            steps {
                script {
                    def result = sh (script: "git log -1 | grep '.*\\[ci skip\\].*'", returnStatus: true)
                    echo "${result}"
                    if (result == 0) {
                        echo "This build should be skipped. Aborting."
                        shouldBuild = "false"
                    }else {
                      echo "Starting build proccess..."
                    }
                }//script
            }//steps
        }//stage

Hope this help someone

@comfroels
Copy link

Yes that is similar to what I ended up doing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants