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

Publish to Docker Hub alongside Quay.io #1796

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
1 change: 1 addition & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ jobs:
# 3. Putting the robot account's username and password in GitHub actions environment
run: |
docker login -u "${{ secrets.QUAY_USERNAME }}" -p "${{ secrets.QUAY_PASSWORD }}" quay.io
docker login -u "${{ secrets.DOCKER_USERNAME }}" -p "${{ secrets.DOCKER_PASSWORD }}" docker.io

- name: Configure a git user
# Having a user.email and user.name configured with git is required to
Expand Down
14 changes: 14 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,20 @@ The minimum Python version is 3.8, and the Helm Chart BinderHub image has been u
[#1610](https://github.com/jupyterhub/binderhub/pull/1610)
[#1611](https://github.com/jupyterhub/binderhub/pull/1611).

### Default image registry changed to Quay.io

We now publish the chart's docker images to both [Quay.io] and [Docker Hub] and
the chart is from now configured to use the images at Quay.io by default.

The change is to ensure that images can be pulled without a [Docker Hub rate
limit] even if the [JupyterHub organization on Docker Hub] wouldn't be sponsored
by Docker Hub in the future, something we need to apply for each year.

[docker hub]: https://hub.docker.com
[docker hub rate limit]: https://docs.docker.com/docker-hub/download-rate-limit/
[jupyterhub organization on docker hub]: https://hub.docker.com/u/jupyterhub
[quay.io]: https://quay.io

# 0.2.0

# master@{2019-07-01}...master@{2019-10-01}
Expand Down
10 changes: 6 additions & 4 deletions ci/publish
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
# Exit on errors, assert env vars, log commands
set -eux

PUBLISH_ARGS="--push --publish-chart \
PUBLISH_ARGS="--push \
--builder docker-buildx \
--platform linux/amd64 --platform linux/arm64 \
"
"

cd helm-chart
# chartpress use git to push to our Helm chart repository, which is the gh-pages
Expand All @@ -32,11 +32,13 @@ if [[ $GITHUB_REF != refs/tags/* ]]; then
PR_OR_HASH=$(git log -1 --pretty=%h-%B | head -n1 | sed 's/^.*\(#[0-9]*\).*/\1/' | sed 's/^\([0-9a-f]*\)-.*/@\1/')
LATEST_COMMIT_TITLE=$(git log -1 --pretty=%B | head -n1)
EXTRA_MESSAGE="${GITHUB_REPOSITORY}${PR_OR_HASH} ${LATEST_COMMIT_TITLE}"
chartpress $PUBLISH_ARGS --extra-message "${EXTRA_MESSAGE}"
chartpress $PUBLISH_ARGS --extra-message "${EXTRA_MESSAGE}" --publish-chart
chartpress $PUBLISH_ARGS --extra-message "${EXTRA_MESSAGE}" --image-prefix=jupyterhub/k8s-
else
# Setting a tag explicitly enforces a rebuild if this tag had already been
# built and we wanted to override it.
chartpress $PUBLISH_ARGS --tag "${GITHUB_REF:10}"
chartpress $PUBLISH_ARGS --tag "${GITHUB_REF:10}" --publish-chart
chartpress $PUBLISH_ARGS --tag "${GITHUB_REF:10}" --image-prefix=jupyterhub/k8s-
fi

# Let us log the changes chartpress did, it should include replacements for
Expand Down
Loading