Multibranch Pipeline - inbuilt "Checkout SCM" stage, how to change clone directory?

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

Multibranch Pipeline - inbuilt "Checkout SCM" stage, how to change clone directory?

Andy Coates
Hi,

Multibranch Declarative Pipeline seems to have an inbuilt step "Checkout SCM" that is run before my defined stages that clones the project repo into $WORKSPACE

How do I change that directory it clones into? e.g. $WORKSPACE/repo_name

Thanks!

--
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/b6823af7-9f33-4699-bf93-ecc832995508%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Multibranch Pipeline - inbuilt "Checkout SCM" stage, how to change clone directory?

Mark Waite-2
You may need to use the "skipDefaultCheckout" option, then use an explicit "checkout" inside a "dir" or other directive that will control the checkout directive.

See skipDefaultCheckout in https://jenkins.io/doc/book/pipeline/syntax/

Mark Waite

On Sun, Nov 5, 2017 at 3:56 PM Andy Coates <[hidden email]> wrote:
Hi,

Multibranch Declarative Pipeline seems to have an inbuilt step "Checkout SCM" that is run before my defined stages that clones the project repo into $WORKSPACE

How do I change that directory it clones into? e.g. $WORKSPACE/repo_name

Thanks!

--
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/b6823af7-9f33-4699-bf93-ecc832995508%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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/CAO49JtGphXH%2BeiEs6UgkL4y%3Ddou0HiykAcT_VptMVxquwEbV7Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Multibranch Pipeline - inbuilt "Checkout SCM" stage, how to change clone directory?

Andy Coates
Thanks - definitely helped preventing two checkouts at least!  I guess I was a little surprised there is no options for that initial checkout, but still workable like this.

Andy.

On Monday, 6 November 2017 12:40:14 UTC+11, Mark Waite wrote:
You may need to use the "skipDefaultCheckout" option, then use an explicit "checkout" inside a "dir" or other directive that will control the checkout directive.

See skipDefaultCheckout in <a href="https://jenkins.io/doc/book/pipeline/syntax/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fjenkins.io%2Fdoc%2Fbook%2Fpipeline%2Fsyntax%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHBraWCvQBeXmMwDxG9aaP69ffLSA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fjenkins.io%2Fdoc%2Fbook%2Fpipeline%2Fsyntax%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHBraWCvQBeXmMwDxG9aaP69ffLSA&#39;;return true;">https://jenkins.io/doc/book/pipeline/syntax/

Mark Waite

On Sun, Nov 5, 2017 at 3:56 PM Andy Coates <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="zJeh1KS7BAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">andy....@...> wrote:
Hi,

Multibranch Declarative Pipeline seems to have an inbuilt step "Checkout SCM" that is run before my defined stages that clones the project repo into $WORKSPACE

How do I change that directory it clones into? e.g. $WORKSPACE/repo_name

Thanks!

--
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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="zJeh1KS7BAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-users/b6823af7-9f33-4699-bf93-ecc832995508%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/b6823af7-9f33-4699-bf93-ecc832995508%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/b6823af7-9f33-4699-bf93-ecc832995508%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-users/b6823af7-9f33-4699-bf93-ecc832995508%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
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/da176e75-a1c5-4b73-8fe9-3ad5d2d2a52d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.