-
Notifications
You must be signed in to change notification settings - Fork 114
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
Docker repo use vars #494
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,2 @@ | ||
[flake8] | ||
max-line-length = 120 | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,7 @@ jobs: | |
- name: Build distro | ||
env: | ||
ZROK_VERSION: ${{ github.event.release.tag_name }} | ||
ZROK_PY_NAME: ${{ vars.ZROK_PY_NAME || null }} | ||
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. 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. |
||
run: | | ||
python setup.py sdist | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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' }} | ||
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 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. |
||
ZROK_CONTAINER_IMAGE_TAG: ${{ steps.semver.outputs.zrok_semver }} | ||
id: tagprep_cli | ||
run: | | ||
echo DOCKER_TAGS="${RELEASE_REPO}:${ZROK_VERSION},${RELEASE_REPO}:latest" | tee -a $GITHUB_OUTPUT | ||
echo DOCKER_TAGS="${ZROK_CONTAINER_IMAGE_REPO}:${ZROK_CONTAINER_IMAGE_TAG},${ZROK_CONTAINER_IMAGE_REPO}:latest" \ | ||
| tee -a $GITHUB_OUTPUT | ||
|
||
# this is the CLI image with the Linux binary for each | ||
# arch that was downloaded in ./dist/ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,20 @@ | ||
from setuptools import setup, find_packages # noqa: H301 | ||
import os | ||
|
||
NAME = "zrok_sdk" | ||
VERSION = "0.4.0.dev" | ||
try: | ||
VERSION = os.environ['ZROK_VERSION'] | ||
except KeyError: | ||
pass | ||
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") | ||
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. Use the new var if defined, else use the same name |
||
# inherit zrok version from environment or default to dev version | ||
VERSION = os.getenv('ZROK_VERSION', "0.4.0.dev") | ||
|
||
# To install the library, run the following | ||
# | ||
# python setup.py install | ||
# | ||
# or | ||
# | ||
# pip install --editable . | ||
# | ||
# prerequisite: setuptools | ||
# http://pypi.python.org/pypi/setuptools | ||
|
||
|
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.
Let's use flake8 to express our consensus to adopt PEP 8.