You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@polaris.apache.org by "adnanhemani (via GitHub)" <gi...@apache.org> on 2025/04/16 07:50:10 UTC
[PR] Push Docker Images on New Release [polaris]
adnanhemani opened a new pull request, #1377:
URL: https://github.com/apache/polaris/pull/1377
<!--
Possible security vulnerabilities: STOP here and contact security@apache.org instead!
Please update the title of the PR with a meaningful message - do not leave it "empty" or "generated"
Please update this summary field:
The summary should cover these topics, if applicable:
* the motivation for the change
* a description of the status quo, for example the current behavior
* the desired behavior
* etc
PR checklist:
- Do a self-review of your code before opening a pull request
- Make sure that there's good test coverage for the changes included in this PR
- Run tests locally before pushing a PR (./gradlew check)
- Code should have comments where applicable. Particularly hard-to-understand
areas deserve good in-line documentation.
- Include changes and enhancements to the documentation (in site/content/in-dev/unreleased)
- For Work In Progress Pull Requests, please use the Draft PR feature.
Make sure to add the information BELOW this comment.
Everything in this comment will NOT be added to the PR description.
-->
This adds a new GitHub Action that will push the generated Docker image to the Docker Hub repository located [here](https://hub.docker.com/r/apache/polaris) whenever a new release is cut.
The only requirement left to make this work is to ensure that the Docker username and token that has the ability to authenticate to this repository is available as a GitHub Secret for the Action to use.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Push Docker Images on New Release [polaris]
Posted by "adnanhemani (via GitHub)" <gi...@apache.org>.
adnanhemani commented on code in PR #1377:
URL: https://github.com/apache/polaris/pull/1377#discussion_r2047992721
##########
.github/workflows/publish-docker.yml:
##########
@@ -0,0 +1,71 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+# This workflow uses actions that are not certified by GitHub.
+# They are provided by a third-party and are governed by
+# separate terms of service, privacy policy, and support
+# documentation.
+
+name: Publish Docker image
+
+on:
+ release:
+ types: [published]
Review Comment:
> What's exactly the trigger ?
Continuing this comment as well, you got it correct. I've put the trigger on the GitHub release - this is due to my inexperience with the Apache release process. Is there a better trigger for this potentially?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Push Docker Images on New Release [polaris]
Posted by "jbonofre (via GitHub)" <gi...@apache.org>.
jbonofre commented on PR #1377:
URL: https://github.com/apache/polaris/pull/1377#issuecomment-2811033673
> Could you push a current version please? Would love to use this now (having issue with gradlew)
@aj-hadrian you have to wait 0.10.0-beta-incubating release that will include binary distributions, including Docker images. 0.10.0-beta-incubating release is planned in a couple of weeks (assuming the vote will pass).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Push Docker Images on New Release [polaris]
Posted by "aj-hadrian (via GitHub)" <gi...@apache.org>.
aj-hadrian commented on PR #1377:
URL: https://github.com/apache/polaris/pull/1377#issuecomment-2811018687
Another Q, I see your image is set to support only arm64, could you also build for x86_64?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Push Docker Images on New Release [polaris]
Posted by "adnanhemani (via GitHub)" <gi...@apache.org>.
adnanhemani commented on PR #1377:
URL: https://github.com/apache/polaris/pull/1377#issuecomment-2811471803
> I propose to wait after 0.10.0-beta-incubating release as I will push the image as part of the release last step.
I'm okay with this but wanted to make sure - wouldn't it be easier to test that this is working as we'd like with the `0.10.0-beta-incubating` release? I'm okay with waiting if there is some hesitation with this new workflow - but would like to know what that is, if any, so I may try help to mitigate that :)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Push Docker Images on New Release [polaris]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #1377:
URL: https://github.com/apache/polaris/pull/1377#issuecomment-2982375010
This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Push Docker Images on New Release [polaris]
Posted by "jbonofre (via GitHub)" <gi...@apache.org>.
jbonofre commented on PR #1377:
URL: https://github.com/apache/polaris/pull/1377#issuecomment-2982860691
I would suggest to close this PR as this step is part of the release guide/process.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Push Docker Images on New Release [polaris]
Posted by "jbonofre (via GitHub)" <gi...@apache.org>.
jbonofre commented on code in PR #1377:
URL: https://github.com/apache/polaris/pull/1377#discussion_r2046387013
##########
.github/workflows/publish-docker.yml:
##########
@@ -0,0 +1,71 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+# This workflow uses actions that are not certified by GitHub.
+# They are provided by a third-party and are governed by
+# separate terms of service, privacy policy, and support
+# documentation.
+
+name: Publish Docker image
+
+on:
+ release:
+ types: [published]
+
+jobs:
+ push_to_registry:
+ name: Push Docker image to Docker Hub
+ runs-on: ubuntu-latest
+ permissions:
+ packages: write
+ contents: read
+ attestations: write
+ id-token: write
+ steps:
+ - name: Check out the repo
+ uses: actions/checkout@v4
+
+ - name: Set up JDK 21
+ uses: actions/setup-java@v4
+ with:
+ java-version: '21'
+ distribution: 'temurin'
+
+ - name: Log in to Docker Hub
+ uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a #v3
+ with:
+ username: ${{ secrets.DOCKER_USERNAME }}
+ password: ${{ secrets.DOCKERHUB_TOKEN }}
+
+ - name: Docker Image build
+ run: |
+ ./gradlew \
+ :polaris-quarkus-server:assemble \
+ :polaris-quarkus-server:quarkusAppPartsBuild --rerun \
+ :polaris-quarkus-admin:assemble \
+ :polaris-quarkus-admin:quarkusAppPartsBuild --rerun \
+ -Dquarkus.container-image.build=true \
+ -PeclipseLinkDeps=org.postgresql:postgresql:42.7.4
+
+ - name: List all Docker images
+ run: docker images
+
+ - name: Push Docker image to Docker Hub
+ run: |
+ docker push apache/polaris
Review Comment:
We should push with the image tag (in addition of `latest`). Basically:
```
docker push apache/polaris:{version}
```
##########
.github/workflows/publish-docker.yml:
##########
@@ -0,0 +1,71 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+# This workflow uses actions that are not certified by GitHub.
+# They are provided by a third-party and are governed by
+# separate terms of service, privacy policy, and support
+# documentation.
+
+name: Publish Docker image
+
+on:
+ release:
+ types: [published]
+
+jobs:
+ push_to_registry:
+ name: Push Docker image to Docker Hub
+ runs-on: ubuntu-latest
+ permissions:
+ packages: write
+ contents: read
+ attestations: write
+ id-token: write
+ steps:
+ - name: Check out the repo
+ uses: actions/checkout@v4
Review Comment:
We should checkout on the release tag here, not on `main`.
##########
.github/workflows/publish-docker.yml:
##########
@@ -0,0 +1,71 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+# This workflow uses actions that are not certified by GitHub.
+# They are provided by a third-party and are governed by
+# separate terms of service, privacy policy, and support
+# documentation.
+
+name: Publish Docker image
+
+on:
+ release:
+ types: [published]
Review Comment:
So, it means that we will push Docker images when release is created on GitHub. That's not required from an Apache standpoint, but good enough.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Push Docker Images on New Release [polaris]
Posted by "adnanhemani (via GitHub)" <gi...@apache.org>.
adnanhemani commented on PR #1377:
URL: https://github.com/apache/polaris/pull/1377#issuecomment-2808717680
Closes #1153 and #152
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Push Docker Images on New Release [polaris]
Posted by "jbonofre (via GitHub)" <gi...@apache.org>.
jbonofre commented on PR #1377:
URL: https://github.com/apache/polaris/pull/1377#issuecomment-2811029341
As part of the release process (again 😄 ), we can push multi platform images.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Push Docker Images on New Release [polaris]
Posted by "adnanhemani (via GitHub)" <gi...@apache.org>.
adnanhemani commented on code in PR #1377:
URL: https://github.com/apache/polaris/pull/1377#discussion_r2047997075
##########
.github/workflows/publish-docker.yml:
##########
@@ -0,0 +1,71 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+# This workflow uses actions that are not certified by GitHub.
+# They are provided by a third-party and are governed by
+# separate terms of service, privacy policy, and support
+# documentation.
+
+name: Publish Docker image
+
+on:
+ release:
+ types: [published]
+
+jobs:
+ push_to_registry:
+ name: Push Docker image to Docker Hub
+ runs-on: ubuntu-latest
+ permissions:
+ packages: write
+ contents: read
+ attestations: write
+ id-token: write
+ steps:
+ - name: Check out the repo
+ uses: actions/checkout@v4
Review Comment:
As per the official documentation for `actions/checkout`, this step will check out the exact SHA that triggered the event. So it will be the release tag.
ref: https://github.com/actions/checkout?tab=readme-ov-file#usage
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Push Docker Images on New Release [polaris]
Posted by "adnanhemani (via GitHub)" <gi...@apache.org>.
adnanhemani commented on PR #1377:
URL: https://github.com/apache/polaris/pull/1377#issuecomment-2808721900
Proof that this works can be found here: https://github.com/adnanhemani/polaris/actions/runs/14487217152/job/40635177296
A similar code with a successful push to my personal remote repo can be found here: https://github.com/adnanhemani/polaris/actions/runs/14486887998
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Push Docker Images on New Release [polaris]
Posted by "aj-hadrian (via GitHub)" <gi...@apache.org>.
aj-hadrian commented on PR #1377:
URL: https://github.com/apache/polaris/pull/1377#issuecomment-2810834301
Could you push a current version please? Would love to use this now (having issue with gradlew)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Push Docker Images on New Release [polaris]
Posted by "adnanhemani (via GitHub)" <gi...@apache.org>.
adnanhemani commented on code in PR #1377:
URL: https://github.com/apache/polaris/pull/1377#discussion_r2048030302
##########
.github/workflows/publish-docker.yml:
##########
@@ -0,0 +1,71 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+# This workflow uses actions that are not certified by GitHub.
+# They are provided by a third-party and are governed by
+# separate terms of service, privacy policy, and support
+# documentation.
+
+name: Publish Docker image
+
+on:
+ release:
+ types: [published]
+
+jobs:
+ push_to_registry:
+ name: Push Docker image to Docker Hub
+ runs-on: ubuntu-latest
+ permissions:
+ packages: write
+ contents: read
+ attestations: write
+ id-token: write
+ steps:
+ - name: Check out the repo
+ uses: actions/checkout@v4
+
+ - name: Set up JDK 21
+ uses: actions/setup-java@v4
+ with:
+ java-version: '21'
+ distribution: 'temurin'
+
+ - name: Log in to Docker Hub
+ uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a #v3
+ with:
+ username: ${{ secrets.DOCKER_USERNAME }}
+ password: ${{ secrets.DOCKERHUB_TOKEN }}
+
+ - name: Docker Image build
+ run: |
+ ./gradlew \
+ :polaris-quarkus-server:assemble \
+ :polaris-quarkus-server:quarkusAppPartsBuild --rerun \
+ :polaris-quarkus-admin:assemble \
+ :polaris-quarkus-admin:quarkusAppPartsBuild --rerun \
+ -Dquarkus.container-image.build=true \
+ -PeclipseLinkDeps=org.postgresql:postgresql:42.7.4
+
+ - name: List all Docker images
+ run: docker images
+
+ - name: Push Docker image to Docker Hub
+ run: |
+ docker push apache/polaris
Review Comment:
The GitHub metadata that generates the version is a bit wonky and requires some parsing. But I know that when we build the Docker images using `./gradlew`, it creates tags for both the version and `latest`. Do you think it is okay to push them all using the `docker push apache/polaris --all-tags`?
ref: https://github.com/adnanhemani/polaris/actions/runs/14486887998/job/40634198664#step:7:20
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Push Docker Images on New Release [polaris]
Posted by "jbonofre (via GitHub)" <gi...@apache.org>.
jbonofre closed pull request #1377: Push Docker Images on New Release
URL: https://github.com/apache/polaris/pull/1377
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org