Add Docker images SNAPSHOT on Docker HUB (nightly)#1593
Add Docker images SNAPSHOT on Docker HUB (nightly)#1593jbonofre wants to merge 1 commit intoapache:mainfrom
Conversation
adutra
left a comment
There was a problem hiding this comment.
@jbonofre thanks for driving this, it will be very useful!
Global suggestion: I would change the image names and tags in order to not mix up release images with nightly images:
- name: Build Server Docker image
run: |
./gradlew \
:polaris-quarkus-server:assemble \
:polaris-quarkus-server:quarkusAppPartsBuild --rerun \
-Dquarkus.container-image.build=true \
-Dquarkus.container-image.push=true \
-Dquarkus.container-image.name=polaris-nightly \
-Dquarkus.container-image.tag=$(date +%Y%m%d) \
-Dquarkus.container-image.additional-tags=""
- name: Build Admin Tool Docker image
run: |
./gradlew \
:polaris-quarkus-admin:assemble \
:polaris-quarkus-admin:quarkusAppPartsBuild --rerun \
-Dquarkus.container-image.build=true \
-Dquarkus.container-image.push=true \
-Dquarkus.container-image.name=polaris-admin-tool-nightly \
-Dquarkus.container-image.tag=$(date +%Y%m%d) \
-Dquarkus.container-image.additional-tags=""
.github/workflows/nightly.yml
Outdated
There was a problem hiding this comment.
This is only pushing the server image, not the admin tool image.
There was a problem hiding this comment.
@adutra Thanks for the suggestion. I was planning to push only the server image, but it makes sense to push both. Then, it makes sense to use different docker image name. I will update this PR accordingly. Thanks !
There was a problem hiding this comment.
@adutra I'm not sure using nightly in the image name is good there. I would prefer in the version/tag. Thoughts ?
There was a problem hiding this comment.
I'm fine either way, as long as you don't use latest for that.
There was a problem hiding this comment.
By the way, in apache DockerHub scope, we can only have polaris as image name for now. We can ask to create another apache/polaris-admin-tool repo. However, I think it's fine to use tag/version like admin-tool-xxxx. It's what I'm doing for the release for now.
OK ?
There was a problem hiding this comment.
Hmm not really :-) we shouldn't mix different binaries under the same image name.
There was a problem hiding this comment.
OK, so for now let's push only server image (polaris). Do you want me to already create apache/polaris-admin-tool repo ?
There was a problem hiding this comment.
I'm fine with pushing just the server for now. If the process to create apache/polaris-admin-tool takes time, I'd say let's start it asap.
There was a problem hiding this comment.
Let's start a discussion on the dev mailing list.
|
Heads up: it would be nice to publish multi-platform images. This can be done with Quarkus + Docker, but one needs to build and push the images at the same time, e.g. ./gradlew \
:polaris-quarkus-server:assemble \
:polaris-quarkus-server:quarkusAppPartsBuild --rerun \
-Dquarkus.docker.buildx.platform=linux/amd64,linux/arm64 \
-Dquarkus.container-image.build=true \
-Dquarkus.container-image.push=true \
-Dquarkus.container-image.name=polaris-nightly \
-Dquarkus.container-image.tag=$(date +%Y%m%d) \
-Dquarkus.container-image.additional-tags=""The same should be done for release images, if possible. |
|
@adutra yes, that's a good point. For 0.10 I did only linux/amd64 image. Let me update the release guide with multi-platform instructions. |
|
Can we move forward with this PR? I'm OK to merge the server image first, or combine it with admin-tool image. |
.github/workflows/nightly.yml
Outdated
There was a problem hiding this comment.
Nit: you could use latest here (and below)
There was a problem hiding this comment.
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:
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.
There was a problem hiding this comment.
Ah, I missed that this publishes to the only repo. I asumed, that this one publishes to a *-nightlies repo.
There was a problem hiding this comment.
Feels much safer to publish to a separate repo to clearly separate releases from snapshots/nightlies, also to not confuse renovate/dependabot.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
I'm ok to use nightly instead of date.
There was a problem hiding this comment.
I updated to use nightly as tag/version.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
As discussed on the mailing list, this PR extends nightly build to push SNAPSHOT images on Docker HUB.