Trying to move to the officially supported Golang vendoring solution from legacy Godeps workflow.
Scenario:
Repo A===
\
========> Repo C (shared library code)
/
Repo B===
What is the best workflow I can choose for a mid-size (roughly 5-10 member) team of engineers to vendor Repo C for both Repo A and Repo B? Engineers of varying abilities, most of which probably shouldn't need to know the details of this at all?
I'm currently using govendor for this. I'd prefer not to switch but would if there is a tool that provides a better workflow.
This needs to integrate with a CI server running the builds. I can think of 3 scenarios:
Vendor Repo C into A & B:
-
Pros:
- Reproducible Builds
- Easy integration with CI
-
Cons:
- Manual and Error Prone - Can easily vendor incorrect code
- Engineers need decent knowledge of vendor tool and methodology
Symlink Repo C trunk branch into vendor folders of A & B:
-
Pros:
- Engineers need no knowledge of vendor tool
- Low Developer Maintenance
-
Cons:
- Builds not (easily) reproducible
- Possibility of including code in build that shouldn't be released
- Less Flexible (Repo A and Repo B can't have differing versions of C)
Include Repo C as a git submodule or subtree in Repo A and Repo B (either utilizing vendor or not):
-
Pros:
- Engineers need no knowledge of vendor tool
- Easy Setup
- Less Maintenance
- Reproducible Builds
-
Cons:
- Having to use git submodule or subtree
Finding surprisingly little about this question on the internet. Is there some idiomatic way of doing this? I'm sure there are other ways of doing this; what am I missing?