Forking project#
The general rule of thumb can be answering positive to one of below questions:
do I need a different toolchain than is provided by current pre-build docker image?
do I need a different set of python package than what is provided by current pre-build docker image and caching can’t help you with that?
do I need to tweak C++ pipeline implementation?
Also it’s worth to mention that some pipelines, like C++ one, have though limitations that can be overcome by caching packages but you still might decide to fork this project and change some lines.
Note
Cookbook for GitLab forks can be found in official documentation. There you can find how to fork a project and how to maintain it.
TODO list#
Mandatory actions#
Create a separate git branch.
Note
It’s worth to mention - this is a rather personal choice. However, if you are not planning to integrate your changes into parent project, it’s better to have a separate branch which contains only your changes.
Change project path in CI external files from
bproto/cicd
to your own.Change macro prefix clang-tidy config file from
BPROTO
to your own.Change include guards prefix from
BPROTO
to your own in an appropriate shell script.Add project specific python packages to pyproject.toml.
Update conan profiles accordingly to your needs.
Note
Current profiles set
c++17
standard.Add project specific conan packages to conanfile.txt.
Optional actions#
Update
clang-format
config file to your needs.Update
clang-tidy
config file to your needs.
Automation#
There is a simple shell script that can automate some of mentioned actions. You can find it under scripts/fork.sh path.
If you’ve forked bproto/cicd into https://gitlab.com/supercoder/cicd, you can run script as follows:
bash scripts/fork.sh -p MY_PREFIX -r supercoder/cicd
More information you can get by reading the script code, which is pretty straight forward.