diff --git a/.github/workflows/pr-smoke-test-quarkus-images.yml b/.github/workflows/pr-smoke-test-quarkus-images.yml index e36da5ecd82b..03e5f66049c8 100644 --- a/.github/workflows/pr-smoke-test-quarkus-images.yml +++ b/.github/workflows/pr-smoke-test-quarkus-images.yml @@ -11,10 +11,18 @@ on: jobs: build: - uses: ./.github/workflows/reusable-smoke-test-images.yml - with: - project: ":smoke-tests:images:quarkus" - cache-read-only: true - # Quarkus 3.7+ requires Java 17+ - skip-java-8: true - skip-java-11: true + steps: + - name: Set tag + run: echo "TAG=$(date '+%Y%m%d').$GITHUB_RUN_ID" >> $GITHUB_ENV + + - uses: ./.github/workflows/reusable-smoke-test-images.yml + with: + project: ":smoke-tests:images:quarkus" + tag: ${{ env.TAG }} + cache-read-only: true + # Quarkus 3.7+ requires Java 17+ + skip-java-8: true + skip-java-11: true + + - name: Verify + run: ./gradlew :smoke-tests:test -PsmokeTestSuite=other diff --git a/.github/workflows/reusable-smoke-test-images.yml b/.github/workflows/reusable-smoke-test-images.yml index 8f3857460494..2028df15d670 100644 --- a/.github/workflows/reusable-smoke-test-images.yml +++ b/.github/workflows/reusable-smoke-test-images.yml @@ -13,6 +13,9 @@ on: project: type: string required: true + tag: + type: string + required: true publish: type: boolean required: false @@ -60,9 +63,6 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Set tag - run: echo "TAG=$(date '+%Y%m%d').$GITHUB_RUN_ID" >> $GITHUB_ENV - - name: Set up Gradle cache uses: gradle/actions/setup-gradle@d156388eb19639ec20ade50009f3d199ce1e2808 # v4.1.0 with: @@ -70,20 +70,20 @@ jobs: - name: Build Java 8 Docker image if: "!inputs.skip-java-8" - run: ./gradlew ${{ inputs.project }}:${{ inputs.publish && 'jib' || 'jibDockerBuild' }} -Ptag=${{ env.TAG }} -PtargetJDK=8 -Djib.httpTimeout=120000 -Djib.console=plain + run: ./gradlew ${{ inputs.project }}:${{ inputs.publish && 'jib' || 'jibDockerBuild' }} -Ptag=${{ inputs.tag }} -PtargetJDK=8 -Djib.httpTimeout=120000 -Djib.console=plain - name: Build Java 11 Docker image if: "!inputs.skip-java-11" - run: ./gradlew ${{ inputs.project }}:${{ inputs.publish && 'jib' || 'jibDockerBuild' }} -Ptag=${{ env.TAG }} -PtargetJDK=11 -Djib.httpTimeout=120000 -Djib.console=plain + run: ./gradlew ${{ inputs.project }}:${{ inputs.publish && 'jib' || 'jibDockerBuild' }} -Ptag=${{ inputs.tag }} -PtargetJDK=11 -Djib.httpTimeout=120000 -Djib.console=plain - name: Build Java 17 Docker image if: "!inputs.skip-java-17" - run: ./gradlew ${{ inputs.project }}:${{ inputs.publish && 'jib' || 'jibDockerBuild' }} -Ptag=${{ env.TAG }} -PtargetJDK=17 -Djib.httpTimeout=120000 -Djib.console=plain + run: ./gradlew ${{ inputs.project }}:${{ inputs.publish && 'jib' || 'jibDockerBuild' }} -Ptag=${{ inputs.tag }} -PtargetJDK=17 -Djib.httpTimeout=120000 -Djib.console=plain - name: Build Java 21 Docker image if: "!inputs.skip-java-21" - run: ./gradlew ${{ inputs.project }}:${{ inputs.publish && 'jib' || 'jibDockerBuild' }} -Ptag=${{ env.TAG }} -PtargetJDK=21 -Djib.httpTimeout=120000 -Djib.console=plain + run: ./gradlew ${{ inputs.project }}:${{ inputs.publish && 'jib' || 'jibDockerBuild' }} -Ptag=${{ inputs.tag }} -PtargetJDK=21 -Djib.httpTimeout=120000 -Djib.console=plain - name: Build Java 23 Docker image if: "!inputs.skip-java-23" - run: ./gradlew ${{ inputs.project }}:${{ inputs.publish && 'jib' || 'jibDockerBuild' }} -Ptag=${{ env.TAG }} -PtargetJDK=23 -Djib.httpTimeout=120000 -Djib.console=plain + run: ./gradlew ${{ inputs.project }}:${{ inputs.publish && 'jib' || 'jibDockerBuild' }} -Ptag=${{ inputs.tag }} -PtargetJDK=23 -Djib.httpTimeout=120000 -Djib.console=plain diff --git a/smoke-tests/images/quarkus/build.gradle.kts b/smoke-tests/images/quarkus/build.gradle.kts index 9ebd97770857..b35edffcd61c 100644 --- a/smoke-tests/images/quarkus/build.gradle.kts +++ b/smoke-tests/images/quarkus/build.gradle.kts @@ -46,6 +46,11 @@ jib { container { mainClass = "bogus" // to suppress Jib warning about missing main class } + pluginExtensions { + pluginExtension { + implementation = "com.google.cloud.tools.jib.gradle.extension.quarkus.JibQuarkusExtension" + } + } } tasks { diff --git a/smoke-tests/src/test/groovy/io/opentelemetry/smoketest/QuarkusSmokeTest.groovy b/smoke-tests/src/test/groovy/io/opentelemetry/smoketest/QuarkusSmokeTest.groovy index e8d87c20c527..b36e3c407071 100644 --- a/smoke-tests/src/test/groovy/io/opentelemetry/smoketest/QuarkusSmokeTest.groovy +++ b/smoke-tests/src/test/groovy/io/opentelemetry/smoketest/QuarkusSmokeTest.groovy @@ -18,8 +18,15 @@ import static io.opentelemetry.smoketest.TestContainerManager.useWindowsContaine @IgnoreIf({ useWindowsContainers() }) class QuarkusSmokeTest extends SmokeTest { + private static final TAG = getTag() + + private static String getTag() { + String tag = System.getenv("TAG") + return tag != null ? tag : "20211213.1574595137" + } + protected String getTargetImage(String jdk) { - "ghcr.io/open-telemetry/opentelemetry-java-instrumentation/smoke-test-quarkus:jdk$jdk-20211213.1574595137" + "ghcr.io/open-telemetry/opentelemetry-java-instrumentation/smoke-test-quarkus:jdk$jdk-$TAG" } @Override