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

Docker repo use vars #494

Merged
merged 2 commits into from
Dec 15, 2023
Merged

Docker repo use vars #494

merged 2 commits into from
Dec 15, 2023

Conversation

qrkourier
Copy link
Member

and enable testing in forks with alternate PyPi module name from var

Copy link

vercel bot commented Dec 14, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated (UTC)
zrok ⬜️ Ignored (Inspect) Dec 14, 2023 11:49pm

@@ -0,0 +1,2 @@
[flake8]
max-line-length = 120
Copy link
Member Author

Choose a reason for hiding this comment

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

Let's use flake8 to express our consensus to adopt PEP 8.

@@ -35,6 +35,7 @@ jobs:
- name: Build distro
env:
ZROK_VERSION: ${{ github.event.release.tag_name }}
ZROK_PY_NAME: ${{ vars.ZROK_PY_NAME || null }}
Copy link
Member Author

Choose a reason for hiding this comment

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

Get the PyPi module name from a var if exists, else set null. There's a counterpart change in setup.py to handle both cases.

@@ -72,11 +72,12 @@ jobs:

- name: Set Up Container Image Tags for zrok CLI Container
env:
RELEASE_REPO: openziti/zrok
ZROK_VERSION: ${{ steps.semver.outputs.zrok_semver }}
ZROK_CONTAINER_IMAGE_REPO: ${{ vars.ZROK_CONTAINER_IMAGE_REPO || 'openziti/zrok' }}
Copy link
Member Author

Choose a reason for hiding this comment

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

This corrects a flaw where a release in a fork will try unsuccessfully, or worse, successfully, to publish to the upstream's Docker Hub registry repo.

from setuptools import find_packages, setup # noqa: H301

# optionally upload to TestPyPi with alternative name in testing repo
NAME = os.getenv('ZROK_PY_NAME', "zrok_sdk")
Copy link
Member Author

Choose a reason for hiding this comment

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

Use the new var if defined, else use the same name zrok_sdk (normalizes to zrok-sdk in PyPi)

@qrkourier qrkourier merged commit 523da9d into main Dec 15, 2023
15 checks passed
@qrkourier qrkourier deleted the docker-repo-use-vars branch December 15, 2023 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants