-
Notifications
You must be signed in to change notification settings - Fork 3
64 lines (54 loc) · 2.22 KB
/
Copy pathquarkus.yaml
File metadata and controls
64 lines (54 loc) · 2.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: "Test using Quarkus Buildpacks"
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
paths-ignore:
- '*.adoc' # Ignores .adoc files at the root of the repository
- '*.md' # Ignores .md files at the root of the repository
- '**/*.md' # Ignores .md files within subdirectories
jobs:
configure-matrix:
uses: ./.github/workflows/configure.yaml
linux-jvm-build:
name: Linux - JVM build
needs: configure-matrix
runs-on: ubuntu-latest
strategy:
matrix: ${{ fromJSON(needs.configure-matrix.outputs.matrix) }}
steps:
- uses: actions/checkout@v3
- name: Install JDK ${{ matrix.java }}
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
check-latest: true
- name: Setup Container Registry
uses: Sgitario/setup-container-registry@v1
- name: Remove podman
run: |
echo "Stopping the podman service as it creates confusion to quarkus buildpack when docker is also installed ..."
sudo systemctl stop podman.socket
sudo systemctl stop podman
sudo apt-get remove podman
- name: Test Quarkus Getting Started using ${{ matrix.builder-image }}
run: |
CONTAINER_NAME=quarkus-jvm-hello
CONTAINER_IMAGE=$CONTAINER_REGISTRY_URL/$CONTAINER_NAME:1.0
DOCKER_HOST=unix:///var/run/docker.sock
# Checkout
git clone --depth 1 --branch ${{ matrix.quarkus_version }} https://github.com/quarkusio/quarkus-quickstarts.git
cd quarkus-quickstarts/getting-started
# Add quarkus-container-image-buildpack extension
mvn -B quarkus:add-extension -Dextensions="container-image-buildpack"
# Build image and push to the container registry
mvn package -B \
-Dquarkus.container-image.image=$CONTAINER_IMAGE \
-Dquarkus.buildpack.jvm-builder-image=${{ matrix.builder-image }} \
-Dquarkus.container-image.build=true \
-Dquarkus.container-image.push=true
# Test application
../../.github/testGreetingApplication.sh $CONTAINER_NAME $CONTAINER_IMAGE