Skip to content
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

Add support for pushing python wheels #55

Merged
merged 1 commit into from
Aug 8, 2023
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
7 changes: 4 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1071,8 +1071,8 @@ additional tags.
Pushing To PyPI Repository
==========================
The 'pypi-push' step attribute is used to push a python package to a remote PyPI
repository. If an artifact with a type of ``python-sdist`` is present in the artifacts
for the step, those packages will be pushed.
repository. If an artifact with a type of ``python-sdist`` or ``python-wheel`` is present
in the artifacts for the step, those packages will be pushed.

The push only occurs if the --push argument is used, similar to how pushing docker
images to remote docker registries works
Expand Down Expand Up @@ -1102,9 +1102,10 @@ doing this:
run:
image: python:2
cmds:
- python setup.py sdist
- python -m build
artifacts:
"dist/*.tar.gz": { type: 'python-sdist' }
"dist/*.whl": { type: 'python-wheel' }
pypi-push:
repository: https://artifactory.example.com/artifactory/api/pypi/pypi-myownrepo
username: myuser
Expand Down
2 changes: 1 addition & 1 deletion buildrunner/steprunner/tasks/pypipush.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def run(self, context):
_artifact.startswith(self.step_runner.name + "/")
and _attributes
and 'type' in _attributes
and _attributes['type'] == "python-sdist"
and _attributes['type'] in ("python-wheel", "python-sdist")
):
self.step_runner.build_runner.pypi_packages[self._repository]['packages'].append(
f"{self.step_runner.build_runner.build_results_dir}/{_artifact}"
Expand Down
Loading