You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(rel): add step to release to update main with latest version (#212)
## Description
Add step to build process that creates a PR to update `main` with the
latest release version.
---
## Checklist
<!--
Kubernetes, both Kustomize and Helm, and Docker Compose MUST be kept in
sync.
You should not merge a change here without a corresponding change in the
other repositories,
unless it is specific to this deployment type. If uneeded, add link or
explanation of why it is not needed here.
-->
- [NA] Update
[CHANGELOG.md](https://github.com/sourcegraph/deploy-sourcegraph-k8s/blob/main/CHANGELOG.md)
- [NA] Update [K8s Upgrade
notes](https://github.com/sourcegraph/sourcegraph/blob/main/doc/admin/updates/kubernetes.md)
- [NA] Kustomiz-specific changes
- [NA] Update sister repository:
[deploy-sourcegraph-helm](https://github.com/sourcegraph/deploy-sourcegraph-helm)
- [NA] Update sister repository:
[deploy-sourcegraph-docker](https://github.com/sourcegraph/deploy-sourcegraph-docker)
- [NA] Verify all images have a valid tag and SHA256 sum
## Test plan
CI during release cycle.
<!--
As part of SOC2/GN-104 and SOC2/GN-105 requirements, all pull requests
are REQUIRED to
provide a "test plan". A test plan is a loose explanation of what you
have done or
implemented to test this, as outlined in our Testing principles and
guidelines:
https://docs.sourcegraph.com/dev/background-information/testing_principles
Write your test plan here after the "Test plan" header.
-->
Copy file name to clipboardExpand all lines: release.yaml
+59Lines changed: 59 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -332,6 +332,7 @@ promoteToPublic:
332
332
cat << EOF | buildkite-agent annotate --style info
333
333
Promoted release is **publicly available** through a git tag at [\`{{version}}\`](https://github.com/sourcegraph/deploy-sourcegraph-k8s/tree/{{version}}).
334
334
EOF
335
+
335
336
- name: 'Promote on release registry'
336
337
cmd: |
337
338
echo "Promoting deploy-sourcegraph-k8s {{version}} release on release registry"
@@ -348,3 +349,61 @@ promoteToPublic:
348
349
echo "Build created, see:"
349
350
echo $body | jq .web_url
350
351
fi
352
+
353
+
- name: "update main with latest version"
354
+
cmd: |
355
+
set -eu
356
+
branch="promote/release-{{version}}-update-main"
357
+
echo "Checking out origin/main"
358
+
git fetch origin main
359
+
git switch main
360
+
echo "Creating branch origin/${branch}"
361
+
git switch -c "${branch}"
362
+
363
+
- name: "sg ops"
364
+
cmd: |
365
+
set -eu
366
+
sg ops update-images \
367
+
--kind k8s \
368
+
--registry index.docker.io/sourcegraph \
369
+
--docker-username=$DOCKER_USERNAME \
370
+
--docker-password=$DOCKER_PASSWORD \
371
+
--pin-tag {{inputs.server.tag}} \
372
+
base/
373
+
374
+
- name: "sg ops (executors)"
375
+
cmd: |
376
+
set -eu
377
+
sg ops update-images \
378
+
--kind k8s \
379
+
--registry index.docker.io/sourcegraph \
380
+
--docker-username=$DOCKER_USERNAME \
381
+
--docker-password=$DOCKER_PASSWORD \
382
+
--pin-tag {{inputs.server.tag}} \
383
+
components/executors/
384
+
385
+
- name: "git:commit"
386
+
cmd: |
387
+
set -eu
388
+
branch="promote/release-{{version}}-update-main"
389
+
find . -name "*.yaml" | xargs git add
390
+
find . -name "*.yml" | xargs git add
391
+
392
+
# Careful with the quoting for the config, using double quotes will lead
393
+
# to the shell dropping out all quotes from the json, leading to failed
394
+
# parsing.
395
+
git commit -am 'update-main: {{version}}' -m 'update main with latest release'
0 commit comments