Skip to content
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
68 changes: 35 additions & 33 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,36 +28,38 @@ on:
- '*.*.*-rc*'
- 'test-docker-publish-*'

docker:
name: Docker
runs-on: ubuntu-22.04
permissions:
contents: read
packages: write
steps:
- name: Set up Java
uses: actions/setup-java@v3
with:
java-version: '17'
- name: Extract Comet version
id: extract_version
run: |
COMET_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
echo "COMET_VERSION=$COMET_VERSION" >> $GITHUB_ENV
- name: Echo Comet version
run: echo "The current Comet version is ${{ env.COMET_VERSION }}"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
push: true
tags: apache/datafusion-comet:spark-3.4-scala-2.12-${{ env.COMET_VERSION }}
file: kube/Dockerfile
jobs:
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

we were missing the jobs part before

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I have run the pipeline locally using act like so:

act -e event.json push

with the following event.json

{
  "ref": "refs/tags/test-docker-publish-foo"
}

and it fail with the following error:

R Build/ubuntu-latest/java 11-spark-3.4-scala-2.13/java-11                                 ] 🚀  Start image=amd64/rust
[PR Build/ubuntu-latest/java 17-spark-3.4-scala-2.13/java-12                                 ] 🚀  Start image=amd64/rust
[PR Build/ubuntu-latest/java 11-spark-3.4-scala-2.13/java-11                                 ]   🐳  docker pull image=amd64/rust platform= username= forcePull=true
[PR Build/ubuntu-latest/java 17-spark-3.4-scala-2.13/java-12                                 ]   🐳  docker pull image=amd64/rust platform= username= forcePull=true
[PR Build/ubuntu-latest/java 8-spark-3.4-scala-2.12/java-7                                   ]   🐳  docker create image=amd64/rust platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[] network="host"
[PR Build/ubuntu-latest/java 11-spark-3.4-scala-2.13/java-11                                 ]   🐳  docker create image=amd64/rust platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[] network="host"
[PR Build/ubuntu-latest/java 17-spark-3.4-scala-2.13/java-12                                 ]   🐳  docker create image=amd64/rust platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[] network="host"
[Run Miri Safety Checks/Miri                                                                 ]   🐳  docker create image=catthehacker/ubuntu:full-latest platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[] network="host"
[Deploy DataFusion Comet site/Build docs                                                     ]   🐳  docker create image=catthehacker/ubuntu:full-latest platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[] network="host"
[Publish Docker images/Docker                                                                ]   🐳  docker create image=catthehacker/ubuntu:full-22.04 platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[] network="host"
Error: failed to create container: 'Error response from daemon: No such image: amd64/rust:latest'

it could be a problem with act or a legitimate missing variable

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nevermind, it looks like I have some proxy settings that do not allow me to pull the image, but the pipeline is valid

docker:
name: Docker
runs-on: ubuntu-22.04
permissions:
contents: read
packages: write
steps:
- name: Set up Java
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Extract Comet version
id: extract_version
run: |
COMET_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
echo "COMET_VERSION=$COMET_VERSION" >> $GITHUB_ENV
- name: Echo Comet version
run: echo "The current Comet version is ${{ env.COMET_VERSION }}"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
push: true
tags: apache/datafusion-comet:spark-3.4-scala-2.12-${{ env.COMET_VERSION }}
file: kube/Dockerfile
2 changes: 1 addition & 1 deletion kube/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ ENV SCALA_VERSION=2.12
USER root

# ntoe the use of a wildcard in the file name so that this works with both snapshot and final release versions
COPY --from=builder /comet/spark/target/comet-spark-spark${SPARK_VERSION}_$SCALA_VERSION-0.2.0*.jar $SPARK_HOME/jars
COPY --from=builder /comet/spark/target/comet-spark-spark${SPARK_VERSION}_$SCALA_VERSION-0.2.0*.jar $SPARK_HOME/jars