gocd-build-github-pull-requests icon indicating copy to clipboard operation
gocd-build-github-pull-requests copied to clipboard

git.fb - submodules problem

Open savage7 opened this issue 8 years ago • 4 comments

I have strange problem concerning submodules. It seams that the they are not cloned correclty. We use git.fb to build our feature, master and develop branches for git-flow.

My Repo looks like this: Main Repo: branch/release/release_1.0 (revision abc) -- Submodule A: Points the certain commit as head on the master

The strange thing is that the repo is cloned differently when i change the setting for default branch:

default branch: master The submodule is checked out correctly. The submodule points to the correct head.

default branch: develop The submodule head points to origin/master not head --> the build fails

For another repo it is the other way round: It build with default branch develop but fails for master.

It seams the the git reset it not done correctly for all submodules. Are they reset? I dont get any log output it the gocd console for this plugin. Does this plugin some kind of merging?

savage7 avatar Oct 23 '17 18:10 savage7

For testing purpose I added a extra task which resets all submodules accordingly: git submodule foreach --recursive git reset --hard git submodule update --recursive --init

This solves the issue, can you add this?

savage7 avatar Oct 23 '17 19:10 savage7

We're encountering the same issue. Is there any progress fixing it?

ravenpride avatar Aug 19 '19 05:08 ravenpride

@ravenpride Would you please be kind enough to send a PR for this issue? I would be happy to review and merge it.

ashwanthkumar avatar Aug 20 '19 20:08 ashwanthkumar

@ashwanthkumar Thank you for your response. Meanwhile we found a way to work without the plugin. We just wanted to build a set of release branches with a specific pattern using one pipeline, but that caused other issues, so we discarded this way entirely and built up separate pipelines.

ravenpride avatar Aug 21 '19 05:08 ravenpride