Skip to content

Commit

Permalink
Fix and test quarkus image
Browse files Browse the repository at this point in the history
  • Loading branch information
trask committed Nov 4, 2024
1 parent 2fc4c77 commit 9c9788d
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 16 deletions.
22 changes: 15 additions & 7 deletions .github/workflows/pr-smoke-test-quarkus-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
16 changes: 8 additions & 8 deletions .github/workflows/reusable-smoke-test-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ on:
project:
type: string
required: true
tag:
type: string
required: true
publish:
type: boolean
required: false
Expand Down Expand Up @@ -60,30 +63,27 @@ 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:
cache-read-only: ${{ inputs.cache-read-only }}

- 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
5 changes: 5 additions & 0 deletions smoke-tests/images/quarkus/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9c9788d

Please sign in to comment.