-
Notifications
You must be signed in to change notification settings - Fork 24
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
feat(rel): add steps to update main with latest versions #600
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,9 +18,9 @@ jobs: | |
uses: azure/setup-helm@v3 | ||
with: | ||
version: v3.9.1 | ||
- uses: actions/setup-python@v2 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.7 | ||
python-version: '3.13' | ||
- uses: azure/[email protected] | ||
id: install | ||
- name: Set up chart-testing | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -559,3 +559,114 @@ promoteToPublic: | |
echo "Build created, see:" | ||
echo $body | jq .web_url | ||
fi | ||
|
||
- name: "update main with latest version" | ||
cmd: | | ||
set -eu | ||
branch="promote/release-{{version}}-update-main" | ||
echo "Checking out origin/main" | ||
git fetch origin main | ||
git switch main | ||
echo "Creating branch origin/${branch}" | ||
git switch -c "${branch}" | ||
Comment on lines
+568
to
+571
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not following something here. We pull main, switch to main, and then switch to another release-branch, and then perform the changes we'd already performed on the previous release branch, in the promote to public step. What's the expected flow here? We close the other (internal) branch PR that gets generated and merge this one? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The earlier step is just assigning the name right? The Otherwise this just looks like making sure things are up to date with main 🤔 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So the idea here is to update
We don't really need to do anything with the other release PRs. They are similar, but not really related. The idea here is to keep them separated and intentionally create a PR for the changes we want made to This will create a new PR that we just then have to merge. Unless I'm missing something here 😆
Yup, really those should be auto-closed in the future in my opinion, as they are really just placeholders for steps in our release process. |
||
|
||
- name: sg ops:sourcegraph | ||
cmd: | | ||
set -eu | ||
registry=index.docker.io/sourcegraph | ||
sg ops update-images \ | ||
-t {{inputs.server.tag}} \ | ||
-k helm \ | ||
--registry "${registry}" \ | ||
--docker-username $DOCKER_USERNAME \ | ||
--docker-password $DOCKER_PASSWORD \ | ||
charts/sourcegraph/ | ||
|
||
- name: sg ops:dind | ||
cmd: | | ||
set -eu | ||
registry=index.docker.io/sourcegraph | ||
sg ops update-images \ | ||
-t {{inputs.server.tag}} \ | ||
-k helm \ | ||
--registry "${registry}" \ | ||
--docker-username $DOCKER_USERNAME \ | ||
--docker-password $DOCKER_PASSWORD \ | ||
charts/sourcegraph-executor/dind/ | ||
|
||
- name: sg ops:k8s | ||
cmd: | | ||
set -eu | ||
registry=index.docker.io/sourcegraph | ||
sg ops update-images \ | ||
-t {{inputs.server.tag}} \ | ||
-k helm \ | ||
--registry "${registry}" \ | ||
--docker-username $DOCKER_USERNAME \ | ||
--docker-password $DOCKER_PASSWORD \ | ||
charts/sourcegraph-executor/k8s/ | ||
|
||
- name: sg ops:migrator | ||
cmd: | | ||
set -eu | ||
registry=index.docker.io/sourcegraph | ||
sg ops update-images \ | ||
-t {{inputs.server.tag}} \ | ||
-k helm \ | ||
--registry "${registry}" \ | ||
--docker-username $DOCKER_USERNAME \ | ||
--docker-password $DOCKER_PASSWORD \ | ||
charts/sourcegraph-migrator/ | ||
|
||
- name: sg ops:appliance | ||
cmd: | | ||
set -eu | ||
registry=index.docker.io/sourcegraph | ||
sg ops update-images \ | ||
-t {{inputs.server.tag}} \ | ||
-k helm \ | ||
--registry "${registry}" \ | ||
--docker-username $DOCKER_USERNAME \ | ||
--docker-password $DOCKER_PASSWORD \ | ||
charts/sourcegraph-appliance/ | ||
|
||
- name: "chart:version" | ||
cmd: | | ||
comby -matcher ".generic" -in-place "version: \":[~\d+\.\d+\.\d+]\"" 'version: "{{inputs.server.tag}}"' -f charts/sourcegraph/Chart.yaml | ||
comby -matcher ".generic" -in-place "version: \":[~\d+\.\d+\.\d+]\"" 'version: "{{inputs.server.tag}}"' -f charts/sourcegraph/examples/subchart/Chart.yaml | ||
comby -matcher ".generic" -in-place "version: \":[~\d+\.\d+\.\d+]\"" 'version: "{{inputs.server.tag}}"' -f charts/sourcegraph-executor/dind/Chart.yaml | ||
comby -matcher ".generic" -in-place "version: \":[~\d+\.\d+\.\d+]\"" 'version: "{{inputs.server.tag}}"' -f charts/sourcegraph-executor/k8s/Chart.yaml | ||
comby -matcher ".generic" -in-place "version: \":[~\d+\.\d+\.\d+]\"" 'version: "{{inputs.server.tag}}"' -f charts/sourcegraph-migrator/Chart.yaml | ||
comby -matcher ".generic" -in-place "version: \":[~\d+\.\d+\.\d+]\"" 'version: "{{inputs.server.tag}}"' -f charts/sourcegraph-appliance/Chart.yaml | ||
|
||
- name: "chart:appVersion" | ||
cmd: | | ||
comby -matcher ".generic" -in-place "appVersion: \":[~\d+\.\d+\.\d+]\"" 'appVersion: "{{inputs.server.tag}}"' -f charts/sourcegraph/Chart.yaml | ||
comby -matcher ".generic" -in-place "appVersion: \":[~\d+\.\d+\.\d+]\"" 'appVersion: "{{inputs.server.tag}}"' -f charts/sourcegraph-executor/dind/Chart.yaml | ||
comby -matcher ".generic" -in-place "appVersion: \":[~\d+\.\d+\.\d+]\"" 'appVersion: "{{inputs.server.tag}}"' -f charts/sourcegraph-executor/k8s/Chart.yaml | ||
comby -matcher ".generic" -in-place "appVersion: \":[~\d+\.\d+\.\d+]\"" 'appVersion: "{{inputs.server.tag}}"' -f charts/sourcegraph-migrator/Chart.yaml | ||
comby -matcher ".generic" -in-place "appVersion: \":[~\d+\.\d+\.\d+]\"" 'appVersion: "{{inputs.server.tag}}"' -f charts/sourcegraph-appliance/Chart.yaml | ||
|
||
- name: "update helm docs" | ||
cmd: ./scripts/helm-docs.sh | ||
|
||
- name: "git:commit" | ||
cmd: | | ||
set -eu | ||
branch="promote/release-{{version}}-update-main" | ||
|
||
git commit -am "prep update main: {{version}}" -m 'update main with latest release' | ||
git push origin "${branch}" | ||
|
||
- name: "github:pr" | ||
cmd: | | ||
set -eu | ||
internal_branch="promote/release-{{version}}-update-main" | ||
gh pr create \ | ||
--fill \ | ||
--draft \ | ||
--base "$internal_branch" \ | ||
--title "Update main: build {{version}}" \ | ||
--body "Test plan: automated release PR, CI will perform additional checks" | ||
echo "🚢 Please check the associated CI build to ensure the process completed". | ||
|
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.
Thank you 🙏🏽
This had been bothering me