-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: Bump image version in the Harvester repo when tagging #174
Conversation
@@ -0,0 +1,6 @@ | |||
# branch mapping from this repo to harvester |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is good.
Can we have this for all independently released components?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm struggling with this. To centralize in one place or controlled in each repo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add an action in the harvester repo to regularly scan these component repos, check for any new tags or releases, and update the related tags accordingly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The initial idea is repo-based. The intention is just to make the owner's life easier.
I'll close this one and see what I can.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about the submodule to handle the whole components update?
If we centralize this thing, maybe we could use other ways, not just bash-based GHA.
Could we do it easier?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason to keep this inside a repo is the workflow can be run after images are successfully published. Or even run after some tests (if there are any) defined by the repo.
Using a separate job to scan all component repos will be more complicated, we'll need to check if CI is running well when the tag was happening.
How about creating an action, and every repo just needs to use the action?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am ok with that.
Just one thing I would like to confirm again. Suppose we use the centralized GitHub action. That means we need to use the same branch naming, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, a branch_mapping mapping file should be kept in the individual repo (just like this PR). I prefer this rather than keeping it in a centralized place. The advantage is the repo owner can know and update the mapping when working on the repo, no need to jump to the centralized repo. The drawback is we don't have a place to know all the mappings for all projects in one place.
Add a workflow to create a PR in the harvester/harvester repo when seeing a tag event. The workflow will: - Determine the stable branch in this repo. e.g., version `v0.7.8` -> branch `v0.7.x`. - Reading the file `.github/branch-mappings.yaml` and determine the corresponding Harvester branch. e.g., `v0.7.x` -> `v1.4` - Clone harvester/harvester repo, checkout corresponding branch, and modify the component's image tags in `deploy/charts/harvester/values.yaml` - Submit a PR. Note a secret named `HARVESTER_BOT_TOKEN` needs to be configured in the repo for actions. The token in the secret must have permission to create PRs in the harvester/harvester repo. The file `.github/branch-mappings.yaml` is read from the default branch. When we have a new mapping, we only need to update the file in the default branch.
Add a workflow to create a PR in the harvester/harvester repo when seeing a tag event. The workflow will:
v0.7.8
-> branchv0.7.x
..github/branch-mappings.yaml
and determine the corresponding Harvester branch. e.g.,v0.7.x
->v1.4
deploy/charts/harvester/values.yaml
HARVESTER_BOT_TOKEN
needs to be configured in the repo for actions. The token in the secret must have permission to create PRs in the harvester/harvester repo.The file
.github/branch-mappings.yaml
is read from the default branch. When we have a new mapping, we only need to update the file in the default branch.