Skip to content

Commit

Permalink
[docker] Add GitHub Action for building and publishing Docker images …
Browse files Browse the repository at this point in the history
…to GHCR (#1264)

- Add a GitHub Action for manual triggering to build Docker images from
specified Git tags.
    - The workflow checks out the repository, validates the tag, builds images
    using a specified script, and pushes them to the GitHub Container Registry.
    Verification steps confirm successful image creation and include metadata
    annotations.
- Upgrade GitHub Actions dependencies:
    - actions/upload-artifact from v3 to v4.  - actions/setup-java from v3 to v4.
    - Replaced gradle/gradle-build-action@v2 with gradle/actions/setup-gradle@v3.
    - Upgraded gradle/wrapper-validation-action@v1 to
    gradle/actions/wrapper-validation@v3.
- Upload unit test artifacts for each JDK in a separate file.
  • Loading branch information
sushantmane authored Oct 29, 2024
1 parent b0eb29e commit f18db1c
Show file tree
Hide file tree
Showing 14 changed files with 425 additions and 262 deletions.
12 changes: 6 additions & 6 deletions .github/rawWorkflows/gh-ci-parameterized-flow.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
with:
fetch-depth: 0
- name: Set up JDK
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.jdk }}
distribution: 'temurin'
Expand All @@ -22,10 +22,10 @@
git remote set-head origin --auto
git remote add upstream https://github.com/linkedin/venice
git fetch upstream
- name: Build with Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: "$GradleArguments"
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Run Integration Tests
run: ./gradlew $GradleArguments
- name: Package Build Artifacts
if: success() || failure()
shell: bash
Expand All @@ -36,7 +36,7 @@
tar -zcvf ${{ github.job }}-jdk${{ matrix.jdk }}-logs.tar.gz ${{ github.job }}-artifacts
- name: Upload Build Artifacts
if: success() || failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ github.job }}
path: ${{ github.job }}-jdk${{ matrix.jdk }}-logs.tar.gz
Expand Down
48 changes: 25 additions & 23 deletions .github/workflows/VeniceCI-CompatibilityTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
with:
fetch-depth: 0
- name: Set up JDK
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.jdk }}
distribution: 'temurin'
Expand All @@ -28,10 +28,10 @@ jobs:
git remote set-head origin --auto
git remote add upstream https://github.com/linkedin/venice
git fetch upstream
- name: Build with Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: "-DmaxParallelForks=2 --parallel :internal:venice-avro-compatibility-test:test --continue"
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Run Avro Compatibility Tests
run: ./gradlew -DmaxParallelForks=2 --parallel :internal:venice-avro-compatibility-test:test --continue
- name: Package Build Artifacts
if: success() || failure()
shell: bash
Expand All @@ -42,7 +42,7 @@ jobs:
tar -zcvf ${{ github.job }}-jdk${{ matrix.jdk }}-logs.tar.gz ${{ github.job }}-artifacts
- name: Upload Build Artifacts
if: success() || failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ github.job }}
path: ${{ github.job }}-jdk${{ matrix.jdk }}-logs.tar.gz
Expand All @@ -63,7 +63,7 @@ jobs:
# Checkout as many commits as needed for the diff
fetch-depth: 2
- name: Check if files have changed
uses: dorny/paths-filter@v2
uses: dorny/paths-filter@v3
id: check_alpini_files_changed
with:
filters: |
Expand All @@ -74,7 +74,7 @@ jobs:
with:
fetch-depth: 0
- name: Set up JDK
uses: actions/setup-java@v3
uses: actions/setup-java@v4
if: steps.check_alpini_files_changed.outputs.alpini == 'true'
with:
java-version: ${{ matrix.jdk }}
Expand All @@ -97,11 +97,12 @@ jobs:
git remote set-head origin --auto
git remote add upstream https://github.com/linkedin/venice
git fetch upstream
- name: Build with Gradle
- name: Setup Gradle
if: steps.check_alpini_files_changed.outputs.alpini == 'true'
uses: gradle/gradle-build-action@v2
with:
arguments: "--continue --no-daemon -DmaxParallelForks=1 alpiniUnitTest"
uses: gradle/actions/setup-gradle@v4
- name: Run alpini unit tests
if: steps.check_alpini_files_changed.outputs.alpini == 'true'
run: ./gradlew --continue --no-daemon -DmaxParallelForks=1 alpiniUnitTest
- name: Package Build Artifacts
if: steps.check_alpini_files_changed.outputs.alpini == 'true' && (success() || failure())
shell: bash
Expand All @@ -112,7 +113,7 @@ jobs:
tar -zcvf ${{ github.job }}-jdk${{ matrix.jdk }}-logs.tar.gz ${{ github.job }}-artifacts
- name: Upload Build Artifacts
if: steps.check_alpini_files_changed.outputs.alpini == 'true' && (success() || failure())
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ github.job }}
path: ${{ github.job }}-jdk${{ matrix.jdk }}-logs.tar.gz
Expand All @@ -133,7 +134,7 @@ jobs:
# Checkout as many commits as needed for the diff
fetch-depth: 2
- name: Check if files have changed
uses: dorny/paths-filter@v2
uses: dorny/paths-filter@v3
id: check_alpini_files_changed
with:
filters: |
Expand All @@ -144,7 +145,7 @@ jobs:
with:
fetch-depth: 0
- name: Set up JDK
uses: actions/setup-java@v3
uses: actions/setup-java@v4
if: steps.check_alpini_files_changed.outputs.alpini == 'true'
with:
java-version: ${{ matrix.jdk }}
Expand All @@ -167,11 +168,12 @@ jobs:
git remote set-head origin --auto
git remote add upstream https://github.com/linkedin/venice
git fetch upstream
- name: Build with Gradle
- name: Setup Gradle
if: steps.check_alpini_files_changed.outputs.alpini == 'true'
uses: gradle/gradle-build-action@v2
with:
arguments: "--continue --no-daemon -DmaxParallelForks=1 alpiniFunctionalTest"
uses: gradle/actions/setup-gradle@v4
- name: Run alpini functional tests
if: steps.check_alpini_files_changed.outputs.alpini == 'true'
run: ./gradlew --continue --no-daemon -DmaxParallelForks=1 alpiniFunctionalTest
- name: Package Build Artifacts
if: steps.check_alpini_files_changed.outputs.alpini == 'true' && (success() || failure())
shell: bash
Expand All @@ -182,7 +184,7 @@ jobs:
tar -zcvf ${{ github.job }}-jdk${{ matrix.jdk }}-logs.tar.gz ${{ github.job }}-artifacts
- name: Upload Build Artifacts
if: steps.check_alpini_files_changed.outputs.alpini == 'true' && (success() || failure())
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ github.job }}
path: ${{ github.job }}-jdk${{ matrix.jdk }}-logs.tar.gz
Expand All @@ -200,7 +202,7 @@ jobs:
with:
fetch-depth: 0
- name: Set up JDK
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.jdk }}
distribution: 'temurin'
Expand All @@ -211,7 +213,7 @@ jobs:
git remote add upstream https://github.com/linkedin/venice
git fetch upstream
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
uses: gradle/actions/setup-gradle@v4
- name: Build with gradle
run: ./gradlew assemble --continue --no-daemon -DforkEvery=1 -DmaxParallelForks=1

Expand Down Expand Up @@ -244,7 +246,7 @@ jobs:
tar -zcvf ${{ github.job }}-artifacts.tar.gz ${{ github.job }}-artifacts
- name: Upload Build Artifacts
if: success() || failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ github.job }}
path: ${{ github.job }}-artifacts.tar.gz
Expand Down
Loading

0 comments on commit f18db1c

Please sign in to comment.