-
Improvement
-
Resolution: Won't Do
-
Trivial
There is no option to fetch and prune tags on all submodules in Jenkins.
In our environment, it happens in rare cases that tags are force-pushed on the main repo and on submodules. We did not find any way to reflect the actual tags before build using Jenkins, except with a full repository wipeout.
Also we have a case where a new tag on the submodule repository was not present on our builder at build time.
We tried using a command such as git fetch --prune origin "refs/tags/:refs/tags/ in the build steps, but this fails as the credentials cannot be used at that stage.
The withCredentials() block in Pipeline will allow you to use arbitrary git commands with a username / password credential (https access to git repositories). The sshAgent block will allow you to use arbitrary git commands with private key credentials. Can you try one of those for your case to see if can workaround the issue?