-
Notifications
You must be signed in to change notification settings - Fork 569
rfc795: add release manifest #965
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
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
d61028f
initial manifest
burmudar 25031af
update manifest
burmudar d13598a
update release manifest to use sg ops update-images instead
burmudar e720afd
use newer ruby
burmudar 22105e1
Revert "use newer ruby"
burmudar 30b8f46
pre-command: write pid file
burmudar a85238c
Include a test-plan in the automated PRs
jhchabran 2b2417f
Homogeize wip branch prefix
jhchabran File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,31 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| # this script is executed by multiple buildkite agents running on one node, so we write the pid to a file | ||
| # if the pidfile exists we know another process is executing so we don't need to install anything | ||
| # | ||
| # A more robust approach would be to use a lock file, but that would require some more work | ||
| set -eu | ||
| pushd "$(dirname "${BASH_SOURCE[0]}")"/../.. | ||
|
|
||
| WORKDIR=$(pwd) | ||
| PIDFILE=/var/lock/dobackup.pid | ||
|
|
||
| remove_pidfile() | ||
| { | ||
| rm -f "$PIDFILE" | ||
| } | ||
|
|
||
| another_instance() | ||
| { | ||
| echo "There is another instance running, skipping" | ||
| exit 0 | ||
| } | ||
|
|
||
| if [ -f "$PIDFILE" ]; then | ||
| kill -0 "$(cat $PIDFILE)" && another_instance | ||
| fi | ||
| trap remove_pidfile EXIT | ||
| echo $$ > "$PIDFILE" | ||
|
|
||
|
|
||
| echo "Installing asdf dependencies as defined in '${WORKDIR}/.tool-versions':" | ||
| asdf install | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,129 @@ | ||
| --- | ||
| meta: | ||
| productName: "deploy-sourcegraph-docker" | ||
| owners: | ||
| - "@sourcegraph/release" | ||
| repository: "github.com/sourcegraph/deploy-sourcegraph-docker" | ||
| inputs: | ||
| releaseId: server | ||
| requirements: | ||
| - name: "go" | ||
| cmd: "which go" | ||
| fixInstructions: "install golang" | ||
| - name: "GitHub cli exists" | ||
| cmd: "which gh" | ||
| fixInstructions: "install GitHub cli" | ||
| internal: | ||
| create: | ||
| steps: | ||
| patch: | ||
| - name: docker(compose):tags | ||
| cmd: | | ||
| set -e | ||
| registry=us-central1-docker.pkg.dev/sourcegraph-ci/rfc795-internal | ||
| sg-rfc ops update-images --registry ${registry} --kind compose --pin-tag {{tag}} docker-compose/ | ||
| - name: docker(shell):tags | ||
| cmd: | | ||
| set -e | ||
| registry=us-central1-docker.pkg.dev/sourcegraph-ci/rfc795-internal | ||
| sg-rfc ops update-images --registry ${registry} --kind shell --pin-tag {{tag}} pure-docker/ | ||
| - name: "git:branch" | ||
| cmd: | | ||
| branch="wip_{{version}}" | ||
| git switch -c "${branch}" | ||
| git commit -am 'release_patch: {{version}}' -m '{{config}}' | ||
| git push origin ${branch} | ||
| - name: "gh" | ||
| cmd: | | ||
| gh pr create -f -t "PRETEND RELEASE WIP: release_patch: build {{version}}" --body "Test plan: automated release PR, CI will perform additional checks" | ||
| minor: | ||
| - name: docker(compose):tags | ||
| cmd: | | ||
| set -e | ||
| registry=us-central1-docker.pkg.dev/sourcegraph-ci/rfc795-internal | ||
| sg-rfc ops update-images --registry ${registry} --kind compose --pin-tag {{tag}} docker-compose/ | ||
| - name: docker(shell):tags | ||
| cmd: | | ||
| set -e | ||
| registry=us-central1-docker.pkg.dev/sourcegraph-ci/rfc795-internal | ||
| sg-rfc ops update-images --registry ${registry} --kind shell --pin-tag {{tag}} pure-docker/ | ||
| - name: "git:branch" | ||
| cmd: | | ||
| branch="wip_{{version}}" | ||
| git switch -c "${branch}" | ||
| git commit -am 'release_minor: {{version}}' -m '{{config}}' | ||
| git push origin ${branch} | ||
| - name: "gh" | ||
| cmd: | | ||
| gh pr create -f -t "PRETEND RELEASE WIP: release_minor: build {{version}}" --body "Test plan: automated release PR, CI will perform additional checks" | ||
| major: | ||
| - name: docker(compose):tags | ||
| cmd: | | ||
| set -e | ||
| registry=us-central1-docker.pkg.dev/sourcegraph-ci/rfc795-internal | ||
| sg-rfc ops update-images --registry ${registry} --kind compose --pin-tag {{tag}} docker-compose/ | ||
| - name: docker(shell):tags | ||
| cmd: | | ||
| set -e | ||
| registry=us-central1-docker.pkg.dev/sourcegraph-ci/rfc795-internal | ||
| sg-rfc ops update-images --registry ${registry} --kind shell --pin-tag {{tag}} pure-docker/ | ||
| - name: "git:branch" | ||
| cmd: | | ||
| branch="wip_{{version}}" | ||
| git switch -c "${branch}" | ||
| git commit -am 'release_major: {{version}}' -m '{{config}}' | ||
| git push origin ${branch} | ||
| - name: "gh" | ||
| cmd: | | ||
| gh pr create -f -t "PRETEND RELEASE WIP: release_major: build {{version}}" --body "Test plan: automated release PR, CI will perform additional checks" | ||
| finalize: | ||
| steps: | ||
| - name: "git:finalize" | ||
| cmd: | | ||
| set -e | ||
| branch="wip_release-{{version}}" | ||
| git switch -c "${branch}" | ||
| echo "pushing branch ${branch}" | ||
| git push origin "${branch}" | ||
| git checkout - | ||
| test: | ||
| steps: | ||
| - name: "foo" | ||
| cmd: | | ||
| echo "Test" | ||
|
|
||
| promoteToPublic: | ||
| create: | ||
| steps: | ||
| - name: docker(compose):tags | ||
| cmd: | | ||
| set -e | ||
| registry=us-central1-docker.pkg.dev/sourcegraph-ci/rfc795-public | ||
| sg-rfc ops update-images --registry ${registry} --kind compose --pin-tag {{tag}} docker-compose/ | ||
| - name: docker(shell):tags | ||
| cmd: | | ||
| set -e | ||
| registry=us-central1-docker.pkg.dev/sourcegraph-ci/rfc795-public | ||
| sg-rfc ops update-images --registry ${registry} --kind shell --pin-tag {{tag}} pure-docker/ | ||
| - name: "git:branch" | ||
| cmd: | | ||
| branch="promote-release_{{version}}" | ||
| git switch -c "${branch}" | ||
| git commit -am 'promote-release: {{version}}' -m '{{config}}' | ||
| git push origin "${branch}" | ||
| - name: "gh" | ||
| cmd: | | ||
| set -e | ||
| branch="wip_release-{{version}}" | ||
| # we need to fetch from origin just in case this branch doesn't exist locally, so that the PR can find the base | ||
| git fetch origin "${branch}" | ||
| gh pr create -f -t "PRETEND PROMOTE RELEASE - release: build {{version}}" --base "${branch}" --body "Test plan: automated release PR, CI will perform additional checks" | ||
| finalize: | ||
| steps: | ||
| - name: git:tag | ||
| cmd: | | ||
| set -e | ||
| branch="wip_release-{{version}}" | ||
| git checkout "${branch}" | ||
| git tag wip_{{version}} | ||
| git push origin ${branch} --tags |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.