Re: Jenkins multibranch checkout

27 views
Skip to first unread message

Mark Waite

unread,
Oct 9, 2017, 8:37:44 AM10/9/17
to Jenkins Users
If you're using declarative pipeline, then you need to use an option directive to skipDefaultCheckout.  Refer to https://jenkins.io/doc/book/pipeline/syntax/#options for the syntax.

If you're using scripted pipeline, insert the pre-scm operations before the checkout scm step.

Mark Waite

On Mon, Oct 9, 2017 at 12:51 AM Gilad Baruchian <gila...@gmail.com> wrote:
Hi,
I noticed that when the multi branch job finds a branch to build it automatically checks out or updates the branch before it even starts executing it's Jenkinsfile.

This is bad for me because I want to run some commands before the checkout, and only then run the checkout myself in the pipeline script (using scm checkout).
Is there any way to do that?

--
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 jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/df61fe3f-c587-4239-bfa2-853e6e2a6560%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages