Version of submodule using dynamic repository #3496
Unanswered
CrazyDaisyRecords
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I try to generate the version of a submodule in my GitLab CI build. Therefore we have setup a prepare stage, which generates the version of the main repository using gittools/gitversion docker container, by passing
/url ${CI_REPOSITORY_URL} /b ${CI_COMMIT_REF_NAME} /c ${CI_COMMIT_SHA}
. This works fine for the version of the main repository, because the required information for dynamic repository version generation is supplied by these GitLab CI variables.Generating the version without dynamic repository does not work (I guess due to shallow fetching?). I have tried several approaches on the fetch strategy, but I always ended up using the dynamic repository. But when using this variables, it seems, that the working directory (e.g. submodule folder) is completely ignored. So calling GitVersion on the submodule folder gives me the same version as calling gitversion on the project root folder. Locally passing the submodule folder works fine.
This is how we call the docker container:
Does anybody has a hint for me, how to get the version of a submodule by using dynamic repository within a GitLab CI pipeline?
Thanks ;)
Beta Was this translation helpful? Give feedback.
All reactions