Is there ANY multibranch pipeline configuration that would allow me to:
* place a Jenkinsfile at single BranchSource repo root, and
* perform A SINGLE FETCH of this repo, full stop, and
* fetch --tags in this single fetch, and
* all of the above works when either "WipeWorkspace" or 
"CleanBeforeCheckout" traits are set, so that the initial fetch (tags and 
all) are preserved without having to fetch --tags again 
??

I have a multibranch pipeline project configured with a single BranchSource 
pointing at my repo containing Jenkinsfile. I have set the following 
BranchSource traits in config.xml:

              <jenkins.plugins.git.traits.BranchDiscoveryTrait/>
              <jenkins.plugins.git.traits.TagDiscoveryTrait/>
              <jenkins.plugins.git.traits.SubmoduleOptionTrait>
                <extension class=
"hudson.plugins.git.extensions.impl.SubmoduleOption">
                  <disableSubmodules>false</disableSubmodules>
                  <recursiveSubmodules>true</recursiveSubmodules>
                  <trackingSubmodules>false</trackingSubmodules>
                  <reference></reference>
                  <parentCredentials>false</parentCredentials>
                  <shallow>false</shallow>
                </extension>
              </jenkins.plugins.git.traits.SubmoduleOptionTrait>
              <jenkins.plugins.git.traits.CleanBeforeCheckoutTrait>
                <extension class=
"hudson.plugins.git.extensions.impl.CleanBeforeCheckout"/>
              </jenkins.plugins.git.traits.CleanBeforeCheckoutTrait>

trying to coerce the project to fetch the repo ONCE to obtain everything my 
pipeline needs. (I have also tried this with "WipeWorkspaceTrait" and I get 
same problem.)

What is happening is that I can configure the project to fetch tags but 
it's meaningless if I have either "WipeWorkspaceTrait" 
or "CleanBeforeCheckoutTrait" set. This is because both of these delete the 
tags in the working tree. The first fetch is obviously there for grabbing 
the Jenkinsfile, but I don't understand why it needs to wipe/clean AFTER 
that. Why do the "WipeWorkspaceTrait" or "CleanBeforeCheckoutTrait" have to 
be implemented AFTER the initial fetch?


-- 
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-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/8e9b12ca-ac47-4da9-977f-99da4b88b255%40googlegroups.com.

Reply via email to