-
-
Notifications
You must be signed in to change notification settings - Fork 216
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8127 from jdubois/graalvm
Native (GraalVM) automated builds
- Loading branch information
Showing
7 changed files
with
135 additions
and
102 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,39 @@ | ||
{ | ||
"name": "Java", | ||
"build": { | ||
"dockerfile": "Dockerfile", | ||
"args": { | ||
"VARIANT": "21-bookworm", | ||
"INSTALL_MAVEN": "true", | ||
"MAVEN_VERSION": "3.9.5", | ||
"INSTALL_GRADLE": "false", | ||
"NODE_VERSION": "lts/*" | ||
} | ||
"image": "mcr.microsoft.com/devcontainers/base:ubuntu", | ||
"features": { | ||
"ghcr.io/devcontainers/features/java:1": { | ||
"version": "21-oracle", | ||
"jdkDistro": "oracle" | ||
}, | ||
"ghcr.io/devcontainers/features/node:1": {}, | ||
"docker-in-docker": "latest", | ||
"github-cli": "latest", | ||
"terraform": "latest" | ||
}, | ||
"settings": { | ||
"java.home": "/docker-java-home", | ||
"maven.executable.path": "/usr/local/sdkman/candidates/maven/current/bin/mvn" | ||
|
||
"customizations": { | ||
"vscode": { | ||
"settings": {}, | ||
"extensions": [ | ||
"dawhite.mustache", | ||
"eamodio.gitlens", | ||
"esbenp.prettier-vscode", | ||
"github.vscode-pull-request-github", | ||
"hashicorp.terraform", | ||
"ms-azuretools.vscode-azureterraform", | ||
"ms-dotnettools.vscode-dotnet-runtime", | ||
"ms-vscode.vscode-node-azure-pack", | ||
"ms-vsliveshare.vsliveshare", | ||
"redhat.fabric8-analytics", | ||
"redhat.vscode-xml", | ||
"streetsidesoftware.code-spell-checker", | ||
"visualstudioexptteam.vscodeintellicode", | ||
"vscjava.vscode-java-pack" | ||
] | ||
} | ||
}, | ||
"extensions": ["vscjava.vscode-java-pack"], | ||
|
||
"forwardPorts": [7471], | ||
"remoteUser": "vscode" | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Build and publish JVM-based images | ||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- 'v*.*.*' | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build_jvm_docker_image: | ||
name: Build and publish the JVM-based Docker image | ||
runs-on: ubuntu-22.04 | ||
env: | ||
DOCKER_IMAGE_NAME: '${{ github.repository_owner }}/jhipster-lite' | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Extract Docker metadata | ||
id: meta | ||
uses: docker/[email protected] | ||
with: | ||
images: ${{ env.DOCKER_IMAGE_NAME }} | ||
|
||
- name: Login to Docker Registry | ||
if: ${{ startsWith(github.ref, 'refs/tags/v') }} | ||
env: | ||
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | ||
uses: docker/[email protected] | ||
id: login-hub | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Build the JVM-based Docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
push: ${{ startsWith(github.ref, 'refs/tags/v') }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Build and publish native (GraalVM) images | ||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- 'v*.*.*' | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build_native_docker_image: | ||
name: Build and publish the native (GraalVM) Docker image | ||
runs-on: ubuntu-22.04 | ||
env: | ||
DOCKER_IMAGE_NAME: '${{ github.repository_owner }}/jhipster-lite-native' | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Extract Docker metadata | ||
id: meta | ||
uses: docker/[email protected] | ||
with: | ||
images: ${{ env.DOCKER_IMAGE_NAME }} | ||
|
||
- name: Set up JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'oracle' | ||
java-version: '21' | ||
check-latest: false | ||
cache: 'maven' | ||
|
||
- name: Build application with Buildpacks | ||
run: | | ||
./mvnw -Pnative -DskipTests clean spring-boot:build-image -Dspring-boot.build-image.imageName=${{ env.DOCKER_IMAGE_NAME }} | ||
- name: Login to Docker Registry | ||
if: ${{ startsWith(github.ref, 'refs/tags/v') }} | ||
env: | ||
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | ||
uses: docker/[email protected] | ||
id: login-hub | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Tag the native (GraalVM) Docker image and push it | ||
if: ${{ startsWith(github.ref, 'refs/tags/v') }} | ||
run: | | ||
docker tag ${{ env.DOCKER_IMAGE_NAME }} ${{ env.DOCKER_IMAGE_NAME }}:latest | ||
docker tag ${{ env.DOCKER_IMAGE_NAME }} ${{ env.DOCKER_IMAGE_NAME }}:${{ github.ref_name }} | ||
docker push --all-tags ${{ env.DOCKER_IMAGE_NAME }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters