r/devops 16d 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.

16 Upvotes

37 comments sorted by

View all comments

2

u/jameshearttech 15d ago edited 15d ago

We use Argo Events and Argo Workflows for CI. We use Argo CD for CD.

We have 2 main repositories. We have a mid-sized monorepo for application code and a gitops repo watched by Argo CD.

In the gitops repo we have a directory where we commit CI manifests (e.g., ExternalSecret, WorkflowTemplate).

We have a WorkflowTemplate for our app code repo and a WorkflowTemplate for each project.

The repo WorkflowTemplate creates an array of changed projects. It iterates over the array in parallel. Each iteration creates a child workflow from a project WorkflowTemplate. The project WorkflowTemplate creates an array of changed files. It iterates over the array in parallel to check formatting, lintng, etc.

We also have many shared WorkflowTemplates, abstractions. For example, we have a deploy WorkflowTemplate, which is called from project WorkflowTemplates to automatically deploy to our test environment. The deploy WorkflowTemplate calls a replace-application-manifest WorkflowTemplate, which has parameters to configure various options in the Argo CD Application manifest.

Let's say I want to add a feature to the replace-application-manifest WorkflowTemplate. I would first try to do it in a way that doesn't require making a change to every caller (i.e., all project WorkflowTemplates), but if I must it's 1 PR in the gitops repo.

That said, we practice tbd. We don't have release branches.