Skip to content

Commit

Permalink
[3.8] Update CI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
gastaldi committed Feb 12, 2025
1 parent 7a66f72 commit e8a1af9
Show file tree
Hide file tree
Showing 16 changed files with 803 additions and 413 deletions.
761 changes: 515 additions & 246 deletions .github/workflows/ci-actions-incremental.yml

Large diffs are not rendered by default.

28 changes: 12 additions & 16 deletions .github/workflows/ci-istio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ env:
jobs:
cache:
name: Build and save artifacts
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
if: "github.repository == 'quarkusio/quarkus' || github.event_name == 'workflow_dispatch'"
steps:
- uses: actions/checkout@v4
Expand All @@ -26,7 +26,7 @@ jobs:
shell: bash
run: tar -I 'pigz -9' -cf maven-repo.tgz -C ~ .m2/repository
- name: Persist Maven repository
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: maven-repo
path: maven-repo.tgz
Expand All @@ -35,7 +35,7 @@ jobs:
kubernetes:
name: Istio + Kubernetes Integration Tests
needs: cache
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
if: "github.repository == 'quarkusio/quarkus' || github.event_name == 'workflow_dispatch'"
strategy:
fail-fast: false
Expand All @@ -49,15 +49,15 @@ jobs:
distribution: 'temurin'
java-version: '17'
- name: Download Maven repository
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: maven-repo
path: .
- name: Extract Maven repository
shell: bash
run: tar -xzf maven-repo.tgz -C ~
- name: Set up Minikube-Kubernetes
uses: manusa/actions-setup-minikube@v2.10.0
uses: manusa/actions-setup-minikube@v2.13.1
with:
minikube version: v1.16.0
kubernetes version: ${{ matrix.kubernetes }}
Expand All @@ -84,14 +84,10 @@ jobs:
export QUARKUS_CONTAINER_IMAGE_REGISTRY=quay.io
./mvnw ${MAVEN_ARGS} clean install -pl :quarkus-integration-test-istio-invoker -De2e-tests -Dkubernetes-e2e-tests
- name: Report status
if: "always() && github.repository == 'quarkusio/quarkus'"
shell: bash
run: |
curl -Ls https://sh.jbang.dev | bash -s - app setup
~/.jbang/bin/jbang .github/NativeBuildReport.java \
issueNumber=29536 \
runId=${{ github.run_id }} \
status=${{ job.status }} \
token=${{ secrets.GITHUB_API_TOKEN }} \
issueRepo=${{ github.repository }} \
thisRepo=${{ github.repository }}
if: always() && github.repository == 'quarkusio/quarkus'
uses: quarkusio/report-status-in-issue@main
with:
github-token: ${{ secrets.GITHUB_API_TOKEN }}
status: ${{ job.status }}
issue-repository: ${{ github.repository }}
issue-number: 29536
70 changes: 29 additions & 41 deletions .github/workflows/ci-kubernetes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ env:
jobs:
cache:
name: Build and save artifacts
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
if: "github.repository == 'quarkusio/quarkus' || github.event_name == 'workflow_dispatch'"
steps:
- uses: actions/checkout@v4
Expand All @@ -26,7 +26,7 @@ jobs:
shell: bash
run: tar -I 'pigz -9' -cf maven-repo.tgz -C ~ .m2/repository
- name: Persist Maven repository
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: maven-repo
path: maven-repo.tgz
Expand All @@ -35,7 +35,7 @@ jobs:
kubernetes:
name: Kubernetes Integration Tests
needs: cache
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
if: "github.repository == 'quarkusio/quarkus' || github.event_name == 'workflow_dispatch'"
strategy:
fail-fast: false
Expand All @@ -49,15 +49,15 @@ jobs:
distribution: 'temurin'
java-version: '17'
- name: Download Maven repository
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: maven-repo
path: .
- name: Extract Maven repository
shell: bash
run: tar -xzf maven-repo.tgz -C ~
- name: Set up Minikube-Kubernetes
uses: manusa/actions-setup-minikube@v2.10.0
uses: manusa/actions-setup-minikube@v2.13.1
with:
minikube version: v1.16.0
kubernetes version: ${{ matrix.kubernetes }}
Expand All @@ -76,22 +76,18 @@ jobs:
export QUARKUS_CONTAINER_IMAGE_REGISTRY=quay.io
./mvnw ${MAVEN_ARGS} clean install -pl :quarkus-integration-test-kubernetes-invoker -De2e-tests -Dkubernetes-e2e-tests
- name: Report status
if: "always() && github.repository == 'quarkusio/quarkus'"
shell: bash
run: |
curl -Ls https://sh.jbang.dev | bash -s - app setup
~/.jbang/bin/jbang .github/NativeBuildReport.java \
issueNumber=26581 \
runId=${{ github.run_id }} \
status=${{ job.status }} \
token=${{ secrets.GITHUB_API_TOKEN }} \
issueRepo=${{ github.repository }} \
thisRepo=${{ github.repository }}
if: always() && github.repository == 'quarkusio/quarkus'
uses: quarkusio/report-status-in-issue@main
with:
github-token: ${{ secrets.GITHUB_API_TOKEN }}
status: ${{ job.status }}
issue-repository: ${{ github.repository }}
issue-number: 26581

knative:
name: Knative Integration Tests
needs: cache
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
if: "github.repository == 'quarkusio/quarkus' || github.event_name == 'workflow_dispatch'"
strategy:
fail-fast: false
Expand All @@ -106,7 +102,7 @@ jobs:
distribution: 'temurin'
java-version: '17'
- name: Download Maven repository
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: maven-repo
path: .
Expand All @@ -130,17 +126,13 @@ jobs:
export QUARKUS_CONTAINER_IMAGE_INSECURE=true
./mvnw ${MAVEN_ARGS} clean install -pl :quarkus-integration-test-kubernetes-invoker -De2e-tests -Dknative-e2e-tests
- name: Report status
if: "always() && github.repository == 'quarkusio/quarkus'"
shell: bash
run: |
curl -Ls https://sh.jbang.dev | bash -s - app setup
~/.jbang/bin/jbang .github/NativeBuildReport.java \
issueNumber=31837 \
runId=${{ github.run_id }} \
status=${{ job.status }} \
token=${{ secrets.GITHUB_API_TOKEN }} \
issueRepo=${{ github.repository }} \
thisRepo=${{ github.repository }}
if: always() && github.repository == 'quarkusio/quarkus'
uses: quarkusio/report-status-in-issue@main
with:
github-token: ${{ secrets.GITHUB_API_TOKEN }}
status: ${{ job.status }}
issue-repository: ${{ github.repository }}
issue-number: 31837


openshift:
Expand All @@ -160,7 +152,7 @@ jobs:
distribution: 'temurin'
java-version: '17'
- name: Download Maven repository
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: maven-repo
path: .
Expand All @@ -187,14 +179,10 @@ jobs:
export QUARKUS_CONTAINER_IMAGE_PASSWORD=${{ secrets.QUAY_QUARKUSCI_PASSWORD }}
./mvnw ${MAVEN_ARGS} clean install -pl :quarkus-integration-test-kubernetes-invoker -De2e-tests -Dopenshift-e2e-tests
- name: Report status
if: "always() && github.repository == 'quarkusio/quarkus'"
shell: bash
run: |
curl -Ls https://sh.jbang.dev | bash -s - app setup
~/.jbang/bin/jbang .github/NativeBuildReport.java \
issueNumber=26582 \
runId=${{ github.run_id }} \
status=${{ job.status }} \
token=${{ secrets.GITHUB_API_TOKEN }} \
issueRepo=${{ github.repository }} \
thisRepo=${{ github.repository }}
if: always() && github.repository == 'quarkusio/quarkus'
uses: quarkusio/report-status-in-issue@main
with:
github-token: ${{ secrets.GITHUB_API_TOKEN }}
status: ${{ job.status }}
issue-repository: ${{ github.repository }}
issue-number: 26582
8 changes: 6 additions & 2 deletions .github/workflows/ci-sanity-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,27 @@ on:
- '.github/ISSUE_TEMPLATE/**'
- '.github/*.yml'
- '.github/*.java'
- '.github/*.conf'
- '.sdkmanrc'
pull_request:
paths:
- '.gitignore'
- '.dockerignore'
- 'adr/**'
- '*.md'
- '*.adoc'
- '*.txt'
- 'adr/**'
- 'jakarta/**'
- '.github/ISSUE_TEMPLATE/**'
- '.github/*.yml'
- '.github/*.java'
- '.github/*.conf'
- '.sdkmanrc'

jobs:
ci-sanity-check:
name: "CI Sanity Check"
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
if: github.repository == 'quarkusio/quarkus'
steps:
- name: Build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
jobs:
analyze:
name: Analyze
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
if: github.repository == 'quarkusio/quarkus'

strategy:
Expand Down
46 changes: 24 additions & 22 deletions .github/workflows/deploy-snapshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:
jobs:
build-and-deploy:
name: "Build and deploy"
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
if: github.repository == 'quarkusio/quarkus'
env:
MAVEN_OPTS: -Xmx2048m -XX:MaxMetaspaceSize=1000m
Expand All @@ -25,18 +25,24 @@ jobs:
with:
distribution: temurin
java-version: 17
- name: Get Date
id: get-date
- name: Generate cache key
id: cache-key
run: |
echo "date=$(/bin/date -u "+%Y-%m")" >> $GITHUB_OUTPUT
shell: bash
- name: Cache Maven Repository
id: cache-maven
uses: actions/cache@v3
CURRENT_BRANCH="${{ github.repository != 'quarkusio/quarkus' && 'fork' || github.base_ref || github.ref_name }}"
CURRENT_MONTH=$(/bin/date -u "+%Y-%m")
CURRENT_DAY=$(/bin/date -u "+%d")
ROOT_CACHE_KEY="m2-cache"
echo "m2-monthly-cache-key=${ROOT_CACHE_KEY}-${CURRENT_MONTH}" >> $GITHUB_OUTPUT
echo "m2-monthly-branch-cache-key=${ROOT_CACHE_KEY}-${CURRENT_MONTH}-${CURRENT_BRANCH}" >> $GITHUB_OUTPUT
echo "m2-cache-key=${ROOT_CACHE_KEY}-${CURRENT_MONTH}-${CURRENT_BRANCH}-${CURRENT_DAY}" >> $GITHUB_OUTPUT
- name: Restore Maven Repository
uses: actions/cache/restore@v4
with:
path: ~/.m2/repository
# refresh cache every month to avoid unlimited growth
key: deploy-snapshots-${{ steps.get-date.outputs.date }}
key: ${{ steps.cache-key.outputs.m2-cache-key }}
restore-keys: |
${{ steps.cache-key.outputs.m2-monthly-branch-cache-key }}-
${{ steps.cache-key.outputs.m2-monthly-cache-key }}-
- name: Build and Deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_API_TOKEN }}
Expand All @@ -49,21 +55,17 @@ jobs:
-Dno-test-modules \
-Dgradle.cache.local.enabled=false \
-Ddokka \
-DskipDocs \
-Prelocations \
clean deploy
- name: Delete Local Artifacts From Cache
shell: bash
run: rm -r ~/.m2/repository/io/quarkus

- name: Report
- name: Report status
if: always()
shell: bash
run: |
curl -Ls https://sh.jbang.dev | bash -s - app setup
~/.jbang/bin/jbang .github/NativeBuildReport.java \
issueNumber=12111 \
runId=${{ github.run_id }} \
status=${{ job.status }} \
token=${{ secrets.GITHUB_API_TOKEN }} \
issueRepo=${{ github.repository }} \
thisRepo=${{ github.repository }}
uses: quarkusio/report-status-in-issue@main
with:
github-token: ${{ secrets.GITHUB_API_TOKEN }}
status: ${{ job.status }}
issue-repository: ${{ github.repository }}
issue-number: 12111
18 changes: 10 additions & 8 deletions .github/workflows/develocity-publish-build-scans.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,29 @@ defaults:
jobs:
publish-build-scans:
if: github.repository == 'quarkusio/quarkus' && github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion != 'cancelled'
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
permissions:
actions: write
pull-requests: write
checks: write
steps:
- name: Setup Build Scan link capture
uses: gradle/github-actions/[email protected]
id: setup
uses: gradle/develocity-actions/[email protected]
with:
add-pr-comment: false
add-job-summary: true
- name: Publish Maven Build Scans
id: publish
uses: gradle/github-actions/maven-build-scan[email protected]
uses: gradle/develocity-actions/maven-publish-build-scan@v1.3
with:
develocity-url: 'https://ge.quarkus.io'
develocity-access-key: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
skip-comment: true
skip-summary: true
- name: Output JSON file
run: |
if [ -f "${{ steps.publish.outputs.build-metadata-file-path }}" ]; then
if [ -f "${{ steps.setup.outputs.build-metadata-file-path }}" ]; then
echo "```json" >> $GITHUB_STEP_SUMMARY
jq '.' ${{ steps.publish.outputs.build-metadata-file-path }} >> $GITHUB_STEP_SUMMARY
jq '.' ${{ steps.setup.outputs.build-metadata-file-path }} >> $GITHUB_STEP_SUMMARY
echo "\n```" >> $GITHUB_STEP_SUMMARY;
fi
- name: Inject build scans in reports
Expand All @@ -41,4 +43,4 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
action: inject-build-scans
workflow-run-id: ${{ github.event.workflow_run.id }}
build-metadata-file-path: ${{ steps.publish.outputs.build-metadata-file-path }}
build-metadata-file-path: ${{ steps.setup.outputs.build-metadata-file-path }}
Loading

0 comments on commit e8a1af9

Please sign in to comment.