Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Commit 3a6f1b4

Browse files
authored
wolfi: Improve auto-update image docs and PR body (#57588)
* Add buildkite link to PR, and update on rebuild * Fine-tune docs
1 parent 0c43296 commit 3a6f1b4

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

dev/ci/scripts/wolfi/update-base-image-hashes.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ PR_TITLE="Auto-update Wolfi base images to latest"
3333
# PR_REVIEWER="sourcegraph/security"
3434
PR_LABELS="SSDLC,wolfi-auto-update,backport 5.2"
3535
PR_BODY="Automatically generated PR to update Wolfi base images to the latest hashes.
36+
37+
Built from Buildkite run [#${BUILDKITE_BUILD_NUMBER}](https://buildkite.com/sourcegraph/sourcegraph/builds/${BUILDKITE_BUILD_NUMBER}).
3638
## Test Plan
3739
- CI build verifies image functionality
3840
- [ ] Confirm PR should be backported to release branch"
@@ -48,7 +50,8 @@ echo ":git: Successfully commited changes and pushed to branch ${BRANCH_NAME}"
4850

4951
# Check if an update PR already exists
5052
if gh pr list --head "${BRANCH_NAME}" --state open | grep -q "${PR_TITLE}"; then
51-
echo ":github: A pull request already exists - no action required"
53+
echo ":github: A pull request already exists - editing it"
54+
gh pr edit "${BRANCH_NAME}" --body "${PR_BODY}"
5255
else
5356
# If not, create a new PR from the branch foobar-day
5457
# TODO: Once validated add '--reviewer "${PR_REVIEWER}"'

doc/dev/how-to/wolfi/add_update_images.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ These configuration files can be processed with apko, which will generate a base
1414

1515
### Update base images for a new release
1616

17-
Before each release, we should update the base images to ensure we include any updated packages and vulnerability fixes.
17+
Before each release, we should update the base images to ensure we include any updated packages and vulnerability fixes. To update the images:
1818

19-
- Review the [auto-update pull request](https://github.com/sourcegraph/sourcegraph/pulls?q=is:pr+head:wolfi-autoupdate/main+is:open) opened by Buildkite, and merge it
19+
- Review the [auto-update pull request](https://github.com/sourcegraph/sourcegraph/pulls?q=is:pr+head:wolfi-auto-update/main+is:open) opened by Buildkite, and merge it
2020

2121
#### Automation
2222

@@ -27,7 +27,7 @@ This process is automated by Buildkite, which runs a daily scheduled build to:
2727
- Update the base image hashes in `dev/oci_deps.bzl`.
2828
- Open, or update the already open pull request updating the hashes.
2929

30-
To update the images (perhaps to pick up a just-released package version), [find a scheduled build](https://buildkite.com/sourcegraph/sourcegraph/builds?branch=main) in Buildkite named "Nightly Rebuild of Wolfi Base Images", and hit "Rebuild".
30+
To rerun the automation (perhaps to pick up a just-released package version), click the Buildkite run link in the [auto-update pull request](https://github.com/sourcegraph/sourcegraph/pulls?q=is:pr+head:wolfi-autoupdate/main+is:open) and hit "Rebuild". Alternatively, look for the latest "Nightly Rebuild of Wolfi Base Images" run [on Buildkite](https://buildkite.com/sourcegraph/sourcegraph/builds?branch=main).
3131

3232
#### Manual image updates
3333

0 commit comments

Comments
 (0)