Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 16 additions & 8 deletions .buildkite/pipeline.release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,30 @@ agents:
queue: hosted

steps:
# This is most to prevent we accidentally tag things.
- block: "OK to release?"

- command: ".buildkite/steps/release-pypi"
label: ":pypi:"
if: build.tag != null
if: build.message =~ /\[release\]/i && build.branch == "main"
env:
# > The username to authenticate to the repository (package index) as. Has no effect on PyPI
# It should be a noop, I set it anyway to prevent prompt showing up.
TWINE_USERNAME: __token__
plugins:
- cluster-secrets#v1.0.0:
variables:
TWINE_PASSWORD: test-collector-python-pypi-api-token
- aws-assume-role-with-web-identity#v1.2.0:
role-arn: "arn:aws:iam::445615400570:role/pipeline-buildkite-test-collector-python-build"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 this aligns with bktec release pipeline

session-tags:
- organization_slug
- organization_id
- pipeline_slug
- build_branch
- aws-ssm#v1.0.0:
parameters:
TWINE_PASSWORD: /pipelines/buildkite/test-collector-python-release/pypi-api-token
- ecr#v2.9.0:
login: true
account_ids: "public.ecr.aws"
region: "us-east-1"
- docker#v5.12.0:
image: "python:3.13"
image: "public.ecr.aws/docker/library/python:3.13.2-bookworm"
environment:
- TWINE_USERNAME
- TWINE_PASSWORD
Expand Down
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,10 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/buildk

## 🚀 Releasing

1. Open a new PR bumping the version number in `constants.py`.
2. Get the PR approved and merged.
3. Tag the merge commit with the same version number, then git push.
4. Go to release pipeline and approve the pipeline to execute.
5. (Optional) In the event of step 4 failure, run `.buildkite/steps/release-pypi` locally with your own credentials.
6. Create a [new github release](https://github.com/buildkite/test-collector-python/releases).
1. Open a new PR bumping the version number in `constants.py`, make sure the PR title contains `[release]`.
2. Get the PR approved and merged, this will trigger the release pipeline.
3. (Optional) In the event of step 3 failure, run `.buildkite/steps/release-pypi` locally with your own credentials.
4. Create a [new github release](https://github.com/buildkite/test-collector-python/releases) for prosperity, you can create a tag as you create the release.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally, we should get automate tag and release creation. but beyond the scope of this PR I guess.


## 📜 License

Expand Down