Is the "checkout scm" step necessary in multi-branch pipelines?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Is the "checkout scm" step necessary in multi-branch pipelines?

Behrang Saeedzadeh
In my pipeline I don't have this step and everything is working fine, but most articles I see on the web have this step in their Jenkinsfile, for example this one from the official Jenkins web site: https://jenkins.io/blog/2015/12/03/pipeline-as-code-with-multibranch-workflows-in-jenkins/

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/45729304-bf5b-47b6-96d0-39bdddc4bb98%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Is the "checkout scm" step necessary in multi-branch pipelines?

Steven Foster
I think it's a feature of declarative syntax rather than multibranch. In declarative, every time a node is allocated it comes with a checkout scm by default.

On Monday, March 12, 2018 at 12:50:53 PM UTC, Behrang wrote:
In my pipeline I don't have this step and everything is working fine, but most articles I see on the web have this step in their Jenkinsfile, for example this one from the official Jenkins web site: <a href="https://jenkins.io/blog/2015/12/03/pipeline-as-code-with-multibranch-workflows-in-jenkins/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fjenkins.io%2Fblog%2F2015%2F12%2F03%2Fpipeline-as-code-with-multibranch-workflows-in-jenkins%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEOZwCldWbzZrMFhdeqtT5DquPNkA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fjenkins.io%2Fblog%2F2015%2F12%2F03%2Fpipeline-as-code-with-multibranch-workflows-in-jenkins%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEOZwCldWbzZrMFhdeqtT5DquPNkA&#39;;return true;">https://jenkins.io/blog/2015/12/03/pipeline-as-code-with-multibranch-workflows-in-jenkins/

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/7897f075-9170-473b-942a-a111cce6b50e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.