I am running a build job with a Project A and submodule project B. Both projects have a fork where we are tracking the tags.
So, the following projects are given:
Project A
- Fork Project A-fork
Project B (submodule of A)
- Fork Project B-Fork
Goal: After build, I want to add a tag to A-fork as well as B-fork to know, which code commits are taken in both projects.
Problem: I was adding A (name "origin"), A-fork (forkA) and B-fork (forkB) to Jenkins GIT repositories. Advanced submodule behaviour is set to "Recursively update submodules" and "Update tracking submodules to tip of branch".
As a post-build step, I am pushing the tags via console:
git push forkA refs/tags/${RELEASE_TAG}
git push forkB refs/tags/${RELEASE_TAG}
So, now the real Problem: When performing like this, the tag which is pushed to forkB (my submodule) is referring to a commit in my parent repository A, but not on the latest code used as submodule in B.
How can I adopt this so that my tag is referring to latest commit in submodule B?
Thanks Christian
Ok, I know fixed it "manually" as a execute shell step.
Not very nice, but working.