Skip to content

Commit

Permalink
Fix native image integration tests (#711)
Browse files Browse the repository at this point in the history
  • Loading branch information
nscuro authored Aug 1, 2023
1 parent 5ea4628 commit c1e3d9b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/_build-native-meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
echo "Including resources: ${RESOURCES_INCLUDES:-None}"
echo "Excluding resources: ${RESOURCES_EXCLUDES:-None}"
mvn clean package -Pnative -pl commons,commons-kstreams,commons-persistence,proto,${{ inputs.module }} -DskipTests \
-Dquarkus.native.builder-image=quay.io/quarkus/ubi-quarkus-mandrel-builder-image:22.3-java17 \
-Dquarkus.native.builder-image=quay.io/quarkus/ubi-quarkus-graalvmce-builder-image:22.3-java17 \
-Dquarkus.native.container-build=true \
-Dquarkus.native.container-runtime-options='--platform=linux/${{ matrix.arch.name }}' \
-Dquarkus.native.resources.includes="$RESOURCES_INCLUDES" \
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,15 @@ jobs:
distribution: 'temurin'
cache: maven
- name: Set up GraalVM
uses: graalvm/setup-graalvm@v1
uses: graalvm/setup-graalvm@d1891786152ae96fee67f86c3a1eae596291bbed # tag=v1.1.2
with:
version: 'latest'
# NOTE: Do NOT use the Oracle GraalVM distribution, as that is causing issues
# with Protobuf serialization. GraalVM Community 17.0.8 and Mandrel 23.0 have
# both been tested to work. We're using GraalVM CE for now because installing
# Mandrel via this action doesn't work quite right.
# https://github.com/DependencyTrack/hyades/issues/641
# https://github.com/quarkusio/quarkus/issues/35125
distribution: 'graalvm-community'
java-version: '17'
components: 'native-image'
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -68,5 +74,5 @@ jobs:
mvn -pl commons,commons-kstreams,commons-persistence,proto,${{ matrix.module }} clean install -Pnative -DskipTests
- name: Test Native Image
run: |-
mvn -pl commons,commons-persistence,proto,${{ matrix.module }} \
mvn -pl commons,commons-kstreams,commons-persistence,proto,${{ matrix.module }} \
test-compile failsafe:integration-test failsafe:verify -Pnative
6 changes: 5 additions & 1 deletion mirror-service/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ quarkus.log.category."org.apache.kafka".level=WARN

## Native Image
#
quarkus.native.additional-build-args=--initialize-at-run-time=org.apache.hc.client5.http.impl.auth.NTLMEngineImpl
quarkus.native.additional-build-args=\
--initialize-at-run-time=org.apache.hc.client5.http.impl.auth.NTLMEngineImpl,\
-H:IncludeResources=securityAdvisories.mustache,\
-H:IncludeResources=securityAdvisoryVulnerabilities.mustache,\
-H:IncludeResources=securityAdvisoryCwes.mustache

## Kafka
#
Expand Down

0 comments on commit c1e3d9b

Please sign in to comment.