> On 18 Dec 2019, at 10:06, 'Björn Pedersen' via Jenkins Users > <[email protected]> wrote: > > > > Am Dienstag, 17. Dezember 2019 17:23:15 UTC+1 schrieb Tim Black: > Understood. Note that, even with "CleanBeforeCheckout" I have to "re fetch > tags" because my initial checkout, the one that "Discover Tags" causes, is > cleaned up afterwards. This is very counter-intuitive, because there's no > high level description of what's going on, or why, or what all the words > ("Fetch", Checkout"..) mean. > > I have empirically determined that "CleanBeforeCHeckout" really means "Clean > after the initial checkout/fetch/clone, the one whose sole purpose in life is > to scan for Jenkinsfile changes, but before the subsequent second (and maybe > third) checkout/fetch/clone operation". > > It appears that the former, initial checkout/fetch/clone has controls in > BranchSource behaviors to get tags, or do not get tags, etc.. but the > subsequent checkout/fetch/clone operations are still a complete mystery to > me. Do I have control over when and how those are going to occur? E.g. how > can I make the subsequent checkout/fetch/clone operations use `--tags` > instead of `--no-tags`? > > Yes, that behaviour is a feature of all scm-driven pipelines: > > First fetch Jenkinsfile on master(!) soley to determine what actually to do > Create a workspace (depending on what is defined in the file, this may be on > a completly different host or a throw-away workspace. > Fetch your repo into this workspace ( scm checkout ....) > You can try to configure the first checkout to use a sparse checkout. > > For Multibranch pipelines, an additional fetch is done before all this to > see which branches have changes that need a build.
I actually suffered a lot from the multiple fetches with the Gerrit Code Review plugin, which is a SCM source with support for multi-branch pipeline. The high number of fetches was triggering throttling on the Gerrit side and thus it was taking *hours* to discover the new branches/changes. I am interested in understanding the shortcuts to get rid of those multiple fetches :-) Luca. -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/6E941FF5-6E64-4BBB-A54D-C6436B95C9B1%40gmail.com.
