-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Test the finalize step * finalize with config from commit * Wait before doing any finalization * Add test placeholder * add release test phase * upup * Fix manifest * small changes before internal build test * fixup pin tag * add promote to public build step * fix pipeline * add finalize step for promotion * fix finalization * fix promote finalize pipeline conditional * Add missing test plan for automated PR * Also push executors * add steps for minor and major --------- Co-authored-by: Jean-Hadrien Chabran <[email protected]>
- Loading branch information
Showing
2 changed files
with
229 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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 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,201 @@ | ||
meta: | ||
productName: deploy-sourcegraph-k8s | ||
repository: "github.com/sourcegraph/deploy-sourcegraph-k8s" | ||
owners: | ||
- "@sourcegraph/release" | ||
|
||
inputs: | ||
- releaseId: server | ||
|
||
requirements: | ||
- name: "Github CLI" | ||
cmd: gh version | ||
fixInstructions: brew install gh | ||
- name: "Docker username" | ||
env: DOCKER_USERNAME | ||
- name: "Docker password" | ||
env: DOCKER_PASSWORD | ||
|
||
internal: | ||
create: | ||
steps: | ||
patch: | ||
- name: "sg ops (base)" | ||
cmd: | | ||
sg-rfc795 ops update-images \ | ||
--kind k8s \ | ||
--registry us-central1-docker.pkg.dev/sourcegraph-ci/rfc795-internal \ | ||
--docker-username=$DOCKER_USERNAME \ | ||
--docker-password=$DOCKER_PASSWORD \ | ||
--pin-tag {{inputs.server.tag}} \ | ||
base/ | ||
- name: "sg ops (executors)" | ||
cmd: | | ||
sg-rfc795 ops update-images \ | ||
--kind k8s \ | ||
--registry us-central1-docker.pkg.dev/sourcegraph-ci/rfc795-internal \ | ||
--docker-username=$DOCKER_USERNAME \ | ||
--docker-password=$DOCKER_PASSWORD \ | ||
--pin-tag {{inputs.server.tag}} \ | ||
components/executors/ | ||
- name: "git:branch" | ||
cmd: | | ||
echo "Creating branch wip_{{version}}" | ||
release_branch="wip_{{version}}" | ||
git checkout -b $release_branch | ||
- name: "git:commit" | ||
cmd: | | ||
find . -name "*.yaml" | xargs git add | ||
find . -name "*.yml" | xargs git add | ||
# Careful with the quoting for the config, using double quotes will lead | ||
# to the shell dropping out all quotes from the json, leading to failed | ||
# parsing. | ||
git commit -m "release_patch: {{version}}" -m '{{config}}' | ||
- name: "git:push" | ||
cmd: | | ||
git push origin wip_{{version}} | ||
- name: "gh cli" | ||
cmd: | | ||
gh pr create -f -t "PRETEND RELEASE WIP: release_patch: build {{version}}" --body "Test plan: automated release PR, CI will perform additional checks" # -l "wip_release" | ||
minor: | ||
- name: "sg ops (base)" | ||
cmd: | | ||
sg-rfc795 ops update-images \ | ||
--kind k8s \ | ||
--registry us-central1-docker.pkg.dev/sourcegraph-ci/rfc795-internal \ | ||
--docker-username=$DOCKER_USERNAME \ | ||
--docker-password=$DOCKER_PASSWORD \ | ||
--pin-tag {{inputs.server.tag}} \ | ||
base/ | ||
- name: "sg ops (executors)" | ||
cmd: | | ||
sg-rfc795 ops update-images \ | ||
--kind k8s \ | ||
--registry us-central1-docker.pkg.dev/sourcegraph-ci/rfc795-internal \ | ||
--docker-username=$DOCKER_USERNAME \ | ||
--docker-password=$DOCKER_PASSWORD \ | ||
--pin-tag {{inputs.server.tag}} \ | ||
components/executors/ | ||
- name: "git:branch" | ||
cmd: | | ||
echo "Creating branch wip_{{version}}" | ||
release_branch="wip_{{version}}" | ||
git checkout -b $release_branch | ||
- name: "git:commit" | ||
cmd: | | ||
find . -name "*.yaml" | xargs git add | ||
find . -name "*.yml" | xargs git add | ||
# Careful with the quoting for the config, using double quotes will lead | ||
# to the shell dropping out all quotes from the json, leading to failed | ||
# parsing. | ||
git commit -m "release_minor: {{version}}" -m '{{config}}' | ||
- name: "git:push" | ||
cmd: | | ||
git push origin wip_{{version}} | ||
- name: "gh cli" | ||
cmd: | | ||
gh pr create -f -t "PRETEND RELEASE WIP: release_minor: build {{version}}" --body "Test plan: automated release PR, CI will perform additional checks" # -l "wip_release" | ||
major: | ||
- name: "sg ops (base)" | ||
cmd: | | ||
sg-rfc795 ops update-images \ | ||
--kind k8s \ | ||
--registry us-central1-docker.pkg.dev/sourcegraph-ci/rfc795-internal \ | ||
--docker-username=$DOCKER_USERNAME \ | ||
--docker-password=$DOCKER_PASSWORD \ | ||
--pin-tag {{inputs.server.tag}} \ | ||
base/ | ||
- name: "sg ops (executors)" | ||
cmd: | | ||
sg-rfc795 ops update-images \ | ||
--kind k8s \ | ||
--registry us-central1-docker.pkg.dev/sourcegraph-ci/rfc795-internal \ | ||
--docker-username=$DOCKER_USERNAME \ | ||
--docker-password=$DOCKER_PASSWORD \ | ||
--pin-tag {{inputs.server.tag}} \ | ||
components/executors/ | ||
- name: "git:branch" | ||
cmd: | | ||
echo "Creating branch wip_{{version}}" | ||
release_branch="wip_{{version}}" | ||
git checkout -b $release_branch | ||
- name: "git:commit" | ||
cmd: | | ||
find . -name "*.yaml" | xargs git add | ||
find . -name "*.yml" | xargs git add | ||
# Careful with the quoting for the config, using double quotes will lead | ||
# to the shell dropping out all quotes from the json, leading to failed | ||
# parsing. | ||
git commit -m "release_patch: {{version}}" -m '{{config}}' | ||
- name: "git:push" | ||
cmd: | | ||
git push origin wip_{{version}} | ||
- name: "gh cli" | ||
cmd: | | ||
gh pr create -f -t "PRETEND RELEASE WIP: release_major: build {{version}}" --body "Test plan: automated release PR, CI will perform additional checks" # -l "wip_release" | ||
finalize: | ||
steps: | ||
- name: "git" | ||
cmd: | | ||
git checkout -b wip-release-{{version}} | ||
git push origin wip-release-{{version}} | ||
git checkout - | ||
test: | ||
steps: | ||
- name: "placeholder" | ||
cmd: | | ||
echo "-- pretending to test release ..." | ||
promoteToPublic: | ||
create: | ||
steps: | ||
- name: "git" | ||
cmd: | | ||
echo "Checking out origin/wip-release-{{version}}" | ||
git fetch origin | ||
git checkout origin/wip-release-{{version}} | ||
- name: "sg ops" | ||
cmd: | | ||
sg-rfc795 ops update-images \ | ||
--kind k8s \ | ||
--registry us-central1-docker.pkg.dev/sourcegraph-ci/rfc795-public \ | ||
--docker-username=$DOCKER_USERNAME \ | ||
--docker-password=$DOCKER_PASSWORD \ | ||
--pin-tag {{inputs.server.tag}} \ | ||
base/ | ||
- name: "sg ops (executors)" | ||
cmd: | | ||
sg-rfc795 ops update-images \ | ||
--kind k8s \ | ||
--registry us-central1-docker.pkg.dev/sourcegraph-ci/rfc795-public \ | ||
--docker-username=$DOCKER_USERNAME \ | ||
--docker-password=$DOCKER_PASSWORD \ | ||
--pin-tag {{inputs.server.tag}} \ | ||
components/executors/ | ||
- name: "git:branch" | ||
cmd: | | ||
echo "Creating branch promote-release_{{version}}" | ||
branch="promote-release_{{version}}" | ||
git checkout -b $branch | ||
- name: "git:commit" | ||
cmd: | | ||
find . -name "*.yaml" | xargs git add | ||
find . -name "*.yml" | xargs git add | ||
# Careful with the quoting for the config, using double quotes will lead | ||
# to the shell dropping out all quotes from the json, leading to failed | ||
# parsing. | ||
git commit -m "promote_release: {{version}}" -m '{{config}}' | ||
- name: "github" | ||
cmd: | | ||
git push origin promote-release_{{version}} | ||
gh pr create -f -t "PRETEND PROMOTE RELEASE WIP: promote-release: build {{version}}" --base wip-release-{{version}} --body "Test plan: automated release PR, CI will perform additional checks" | ||
finalize: | ||
# These steps should only really run once the pr created in the create step is merged | ||
steps: | ||
- name: git:tag | ||
cmd: | | ||
branch="wip-release-{{version}}" | ||
git checkout ${branch} | ||
git tag {{version}} | ||
git push origin ${branch} --tags |