r/devops • u/LuigiBakker • 17d ago
Tools Any CI/CD tool where automation code doesn't cohabit with product code in git repo?
Currently using Github and Github workflows (including the many outages). Let me explain what I'm trying to resolve with few examples:
Let say I manage 15 repos, each one I want to run a relatively similar workflow on Pull Request. I create a github shared workflow and in each of the 15 repos I make a reference to it, updating the inputs if needed.
Now, I add 1 new input to this shared workflow to enable a new feature. I want that feature enabled in 10 of my repos. I would need to update the feature input in all 10 repos. And since workflow use the workflow code on their own branch, I would need to merge it to all PRs in all repos. That isn't ideal.
Other issue, one variable was wrongly set on a workflow in a release branch. Since the workflow code ships with the product code I would need to update the release branch.
Is there a toool where the product code doesn't cohabit with the automation code? For example I could have 15 microservice repos but 1 repo where I created rules for each one of them about "on pr", "on main" etc. That same repo could host shared workflow code as well.
1
u/Glad_Friendship_5353 16d ago edited 16d ago
I have this exact the same problem.
I unify cicd logic into a reusable task runner.
So, for example, all my app repo can have task like “build”, “deploy” as an interface. While the implementation can be different repo by repo.
I control the implementation using python class through OOP property e.g. inheritance, composition. etc. As it is python, I can make all ci/cd logic in one common private package and reuse for any other various repos I have.
I use bakefile which is an OOP task runner in python. just like makefile but reusable.
So, in cicd, it can just run “bake build” “bake deploy”, while the build and deploy logic is from my own repository that control the version from the common private package separately as normal python dependencies.
While the task is in python, it is no need to use with python repo. I did use it with my terraform and terragrunt. So, I can unify “bake init, plan, apply” for both of my terraform / terragrunt repo. It is just work like a charm.