-
Notifications
You must be signed in to change notification settings - Fork 12
PIE-3516 part 1: get ready to use CD pipeline #37
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| 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 | ||
| 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 | ||
|
Comment on lines
+15
to
+18
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This pipeline isn't working yet as I am still pending on some plumbing works to get this secret provisioned. But merging this PR has no harm.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I will use a follow-up PR to replace this with AWS SSM |
||
| - docker#v5.12.0: | ||
| image: "python:3.13" | ||
| environment: | ||
| - TWINE_USERNAME | ||
| - TWINE_PASSWORD | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| set -o errexit | ||
| set -o pipefail | ||
| set -o nounset | ||
|
|
||
| __dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
| __root="$(cd "$(dirname "${__dir}")"/../ && pwd)" | ||
|
|
||
| cd "$__root" | ||
|
|
||
| python -m venv .venv && source .venv/bin/activate | ||
|
|
||
| pip install -e '.[dev]' | ||
|
|
||
| # It will spit out a tar.gz in ./dist | ||
| python -m build | ||
|
|
||
| python -m twine check dist/* | ||
|
|
||
| python -m twine upload --skip-existing dist/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what this referring to. Can you explain this bit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this input is a noop for PyPi. According to:
twine upload --helpBut I set it anyway to prevent prompt showing up.
I guess I could also use
--non-interactive, but it would break UX when we use the script manually. 🤷🏿 so I am not sure which one is better.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha! Maybe worth putting that quote in the code as comment?