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:
1. First fetch Jenkinsfile on master(!) soley to determine what
actually to do
2. Create a workspace (depending on what is defined in the file, this
may be on a completly different host or a throw-away workspace.
3. 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.
Björn
--
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/01389598-8a0b-450a-afe1-ae63ff5f7ebe%40googlegroups.com.