Skip to content

Add Docker images SNAPSHOT on Docker HUB (nightly) #1593

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
26 changes: 26 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,29 @@ jobs:
env:
ORG_GRADLE_PROJECT_apacheUsername: ${{ secrets.NEXUS_USER }}
ORG_GRADLE_PROJECT_apachePassword: ${{ secrets.NEXUS_PW }}
- name: Publish Server Docker nightly image
run: |
./gradlew \
:polaris-server:assemble \
:polaris-server:quarkusAppPartsBuild --rerun \
-Dquarkus.container-image.build=true \
-Dquarkus.container-image.push=true \
-DDquarkus.docker.buildx.platform="linux/amd64,linux/arm64" \
-Dquarkus.container-image.name=polaris \
-Dquarkus.container-image.tag=nightly \
-Dquarkus.container-image.additional-tags="" \
Copy link
Member

Choose a reason for hiding this comment

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

Nit: you could use latest here (and below)

Copy link
Contributor

Choose a reason for hiding this comment

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

If the repository + image name are the same as the ones used for releases, it's safer to not use latest for nightlies.

I recall this ML discussion:

https://lists.apache.org/thread/nr4bw27zyfsr0cc0cn34h1yq0d1t01f7

There wasn't a formal consensus there, but the emerging idea would be to use the nightly tag, rather than a timestamp, to avoid accumulation of tags.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, I missed that this publishes to the only repo. I asumed, that this one publishes to a *-nightlies repo.

Copy link
Member

Choose a reason for hiding this comment

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

Feels much safer to publish to a separate repo to clearly separate releases from snapshots/nightlies, also to not confuse renovate/dependabot.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not fan at all of a separate repo for nightly/snapshots.
I think it's better for user to just use the same repo with a specific tag format.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm ok to use nightly instead of date.

Copy link
Member Author

Choose a reason for hiding this comment

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

I updated to use nightly as tag/version.

Copy link
Member

Choose a reason for hiding this comment

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

IIRC we discussed the cons of using one repo, as new tags will confuse renovate and dependabot.
I think, we have to direct users to "proper" releases, not to nightlies or snapshots.

Copy link
Contributor

Choose a reason for hiding this comment

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

Reading Renovate's doc, it seems it is smart enough to never update a x.y.z tag to a nightly tag:

If the image tag in use "looks" like a version (e.g. myimage:1, myimage:1.1, myimage:1.1.0, myimage:1-onbuild) then Renovate checks the Docker registry for upgrades (e.g. from myimage:1.1.0 to myimage:1.2.0)

The above seems to imply that the nightly tag would be ignored since it doesn't "look like" a version.

But I didn't verify if that's indeed the case.

-Dquarkus.container-image.username=${{ secrets.DOCKERHUB_USER }} \
-Dquarkus.container-image.password=${{ secrets.DOCKERHUB_TOKEN }}
- name: Publish Admin Tool Docker nightly image
run: |
./gradlew \
:polaris-admin:assemble \
:polaris-admin:quarkusAppPartsBuild --rerun \
-Dquarkus.container-image.build=true \
-Dquarkus.container-image.push=true \
-DDquarkus.docker.buildx.platform="linux/amd64,linux/arm64" \
-Dquarkus.container-image.name=polaris-admin-tool \
-Dquarkus.container-image.tag=nightly \
-Dquarkus.container-image.additional-tags="" \
-Dquarkus.container-image.username=${{ secrets.DOCKERHUB_USER }} \
-Dquarkus.container-image.password=${{ secrets.DOCKERHUB_TOKEN }}
Loading