Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat : enable native image building #929

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/catalog-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ jobs:
native-image --version

- name: Build and analyze
run: ./mvnw clean verify
run: ./mvnw clean -Pnative verify

- if: ${{ github.ref == 'refs/heads/main' }}
name: Build Image and push to docker
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
DOCKER_PASSCODE: ${{secrets.DOCKER_PASSCODE}}
DOC_USERNAME: ${{secrets.DOCKER_USERNAME}}
run: ./mvnw spring-boot:build-image -DskipTests -DCI_DOCKER_PASSWORD=${DOCKER_PASSCODE} -DCI_DOCKER_USERNAME=${DOC_USERNAME}
run: ./mvnw -Pnative spring-boot:build-image -DskipTests -DCI_DOCKER_PASSWORD=${DOCKER_PASSCODE} -DCI_DOCKER_USERNAME=${DOC_USERNAME}
7 changes: 7 additions & 0 deletions catalog-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,13 @@

<build>
<plugins>
<plugin>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>native-maven-plugin</artifactId>
<configuration>
<mainClass>com.example.catalogservice.CatalogServiceApplication</mainClass>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
Expand Down
5 changes: 4 additions & 1 deletion catalog-service/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,7 @@ eureka.client.webclient.enabled=true

# Enable starting tc in parallel
spring.testcontainers.beans.startup=parallel
spring.threads.virtual.enabled=true
spring.threads.virtual.enabled=true

# Only for building nativeImage
spring.cloud.config.import-check.enabled=false
Loading