Skip to content

Commit

Permalink
Upgrade github action versions (apache#10327)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiangfu0 authored Feb 23, 2023
1 parent a1d1c3b commit d3c8ec2
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 15 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/pinot_compatibility_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,11 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'adopt'
cache: 'maven'
- name: Pinot Compatibility Regression Testing
if : ${{github.event_name == 'workflow_dispatch'}}
env:
Expand All @@ -62,7 +64,7 @@ jobs:
if: always()
run: |
zip -1 -r artifacts.zip /tmp/compatibility-verifier/*
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
name: Store compatibility verifier work directory
if: always()
with:
Expand Down
34 changes: 24 additions & 10 deletions .github/workflows/pinot_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,11 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'adopt'
cache: 'maven'
- name: Linter Test
env:
MAVEN_OPTS: >
Expand All @@ -76,9 +78,11 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'adopt'
cache: 'maven'
# Step that does that actual cache save and restore
- uses: actions/cache@v3
env:
Expand Down Expand Up @@ -120,9 +124,11 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'adopt'
cache: 'maven'
# Step that does that actual cache save and restore
- uses: actions/cache@v3
env:
Expand Down Expand Up @@ -164,10 +170,12 @@ jobs:
name: Pinot Compatibility Regression Testing against ${{ matrix.old_commit }} on ${{ matrix.test_suite }}
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: 1.8
java-version: 8
distribution: 'adopt'
cache: 'maven'
# Step that does that actual cache save and restore
- uses: actions/cache@v3
env:
Expand Down Expand Up @@ -200,14 +208,16 @@ jobs:
matrix:
# We only test LTS Java versions
# TODO: add JDK 17 once ready. see: https://github.com/apache/pinot/issues/8529
java: [ 1.8, 11, 15 ]
java: [ 8, 11, 15 ]
name: Pinot Quickstart on JDK ${{ matrix.java }}
steps:
- uses: actions/checkout@v2
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: 'adopt'
cache: 'maven'
# Step that does that actual cache save and restore
- uses: actions/cache@v3
env:
Expand All @@ -227,9 +237,11 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'adopt'
cache: 'maven'
- name: Build presto pinot driver with JDK 11
env:
MAVEN_OPTS: >
Expand All @@ -244,9 +256,11 @@ jobs:
run: |
mvn clean install -DskipTests -Ppresto-driver -am -B -pl ':presto-pinot-driver' -T 16 || exit 1
- name: Set up JDK 8
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
java-version: 8
distribution: 'adopt'
cache: 'maven'
- name: Build presto pinot driver with JDK 8
env:
MAVEN_OPTS: -Xmx2G -DfailIfNoTests=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 -Dmaven.wagon.http.retryHandler.count=3 -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pinot_vuln_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ jobs:
name: Verify Docker Image
runs-on: ubuntu-latest
steps:
- uses: docker/setup-qemu-action@v1
- uses: docker/setup-qemu-action@v2
name: Set up QEMU
- uses: docker/setup-buildx-action@v1
- uses: docker/setup-buildx-action@v2
name: Set up Docker Buildx
- uses: actions/checkout@v3
- name: Build the Docker image
Expand Down
7 changes: 6 additions & 1 deletion docker/images/pinot-base/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
-->

# docker-pinot-base

This is the base docker image to build [Apache Pinot](https://github.com/apache/pinot).

## How to build a docker image
Expand All @@ -31,6 +32,7 @@ Arguments:
`OPENJDK_IMAGE`: Base image to use for Pinot build and runtime, e.g. `arm64v8/openjdk`. Default is `openjdk`.

Usage:

```SHELL
docker build -t apachepinot/pinot-base-build:openjdk11 --no-cache --network=host --build-arg JAVA_VERSION=11 -f pinot-base-build/Dockerfile .
```
Expand All @@ -40,9 +42,11 @@ docker build -t apachepinot/pinot-base-runtime:openjdk11 --no-cache --network=ho
```

Note that if you are not on arm64 machine, you can still build the image by turning on the experimental feature of docker, and add `--platform linux/arm64` into the `docker build ...` script, e.g.

```SHELL
docker build -t apachepinot/pinot-base-build:openjdk11-arm64v8 --platform linux/arm64 --no-cache --network=host --build-arg JAVA_VERSION=11 --build-arg OPENJDK_IMAGE=arm64v8/openjdk -f pinot-base-build/Dockerfile .
```

```SHELL
docker build -t apachepinot/pinot-base-runtime:openjdk11-arm64v8 --platform linux/arm64 --no-cache --network=host --build-arg JAVA_VERSION=11 --build-arg OPENJDK_IMAGE=arm64v8/openjdk -f pinot-base-runtime/Dockerfile .
```
Expand All @@ -54,6 +58,7 @@ Here is the [Github Action task](https://github.com/apachepinot/pinot-fork/actio
This task can be triggered manually to build the cross platform(amd64 and arm64v8) base image.

The build shell is:

```SHELL
docker buildx build --no-cache --platform=linux/arm64,linux/amd64 --file Dockerfile --tag apachepinot/pinot-base-build:openjdk11 --push .
```
```
1 change: 1 addition & 0 deletions docker/images/pinot/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ RUN git clone ${PINOT_GIT_URL} ${PINOT_BUILD_DIR} && \
cd ${PINOT_BUILD_DIR} && \
git checkout ${PINOT_BRANCH} && \
mvn install package -DskipTests -Pbin-dist -Pbuild-shaded-jar -Djdk.version=${JDK_VERSION} -T1C && \
rm -rf /root/.m2 && \
mkdir -p ${PINOT_HOME}/configs && \
mkdir -p ${PINOT_HOME}/data && \
cp -r build/* ${PINOT_HOME}/. && \
Expand Down

0 comments on commit d3c8ec2

Please sign in to comment.