Skip to content

Commit 136bf71

Browse files
authored
Beheer: run Quarkus nu op CI (#201)
Per ongeluk in de vorige PR had ik geforce-pusht en mijn wijzigingen overschreven van een oude commit. Dit zet alle wijzigingen weer terug naar hoe ze bedoeld waren.
1 parent 6629e30 commit 136bf71

File tree

11 files changed

+86
-352
lines changed

11 files changed

+86
-352
lines changed

.github/workflows/build.yml

Lines changed: 55 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,55 @@
1-
name: Build and Check
2-
on:
3-
workflow_dispatch:
4-
pull_request:
5-
push:
6-
branches:
7-
- main
8-
- develop
9-
jobs:
10-
build:
11-
name: Build
12-
uses: Logius-standaarden/Automatisering/.github/workflows/build.yml@main
13-
check:
14-
needs: build
15-
name: Check
16-
uses: Logius-standaarden/Automatisering/.github/workflows/check.yml@main
17-
publish:
18-
needs: build
19-
name: Publish (Logius)
20-
uses: Logius-standaarden/Automatisering/.github/workflows/publish.yml@main
21-
secrets: inherit
22-
spectral_linter:
23-
needs: build
24-
name: Spectral linter test cases
25-
runs-on: ubuntu-22.04
26-
steps:
27-
- uses: actions/checkout@v4
28-
- uses: actions/setup-node@v4
29-
with:
30-
node-version: 20
31-
- name: Run test suite
32-
run: |
33-
npm install -g @stoplight/spectral-cli
34-
node linter/run-linter-tests.mjs
1+
name: Build and Check
2+
on:
3+
workflow_dispatch:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
- develop
9+
jobs:
10+
build:
11+
name: Build
12+
uses: Logius-standaarden/Automatisering/.github/workflows/build.yml@main
13+
check:
14+
needs: build
15+
name: Check
16+
uses: Logius-standaarden/Automatisering/.github/workflows/check.yml@main
17+
publish:
18+
needs: build
19+
name: Publish (Logius)
20+
uses: Logius-standaarden/Automatisering/.github/workflows/publish.yml@main
21+
secrets: inherit
22+
spectral_linter:
23+
needs: build
24+
name: Spectral linter test cases
25+
runs-on: ubuntu-22.04
26+
steps:
27+
- uses: actions/checkout@v4
28+
- uses: actions/setup-node@v4
29+
with:
30+
node-version: 20
31+
- name: Run test suite
32+
run: |
33+
npm install -g @stoplight/spectral-cli
34+
node linter/run-linter-tests.mjs
35+
examples_linter:
36+
needs: spectral_linter
37+
name: Examples linter tests
38+
runs-on: ubuntu-22.04
39+
strategy:
40+
matrix:
41+
# Minimum supported and maximum available.
42+
example: [ quarkus ]
43+
steps:
44+
- uses: actions/checkout@v4
45+
- uses: actions/setup-node@v4
46+
with:
47+
node-version: 20
48+
- uses: actions/setup-java@v4
49+
with:
50+
distribution: 'zulu'
51+
java-version: 21
52+
- name: Install Spectral
53+
run: npm install -g @stoplight/spectral-cli
54+
- name: Run linter on ${{ matrix.example }} example
55+
run: ./examples/${{ matrix.example }}/build-and-check-project.sh

examples/quarkus/.dockerignore

Lines changed: 0 additions & 5 deletions
This file was deleted.

examples/quarkus/README.md

Lines changed: 7 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,15 @@
1-
# code-with-quarkus
1+
# Quarkus example
22

3-
This project uses Quarkus, the Supersonic Subatomic Java Framework.
3+
Dit project gebruikt Quarkus: <https://quarkus.io/>, een Java framework waarmee onder andere API's kunnen worden gebruikt.
44

5-
If you want to learn more about Quarkus, please visit its website: <https://quarkus.io/>.
6-
7-
## Running the application in dev mode
8-
9-
You can run your application in dev mode that enables live coding using:
10-
11-
```shell script
12-
./mvnw quarkus:dev
13-
```
14-
15-
> **_NOTE:_** Quarkus now ships with a Dev UI, which is available in dev mode only at <http://localhost:8080/q/dev/>.
16-
17-
## Packaging and running the application
18-
19-
The application can be packaged using:
5+
Om het project te bouwen en een `openapi.json` te genereren, run het volgende:
206

217
```shell script
228
./mvnw package
239
```
2410

25-
It produces the `quarkus-run.jar` file in the `target/quarkus-app/` directory.
26-
Be aware that it’s not an _über-jar_ as the dependencies are copied into the `target/quarkus-app/lib/` directory.
27-
28-
The application is now runnable using `java -jar target/quarkus-app/quarkus-run.jar`.
29-
30-
If you want to build an _über-jar_, execute the following command:
31-
32-
```shell script
33-
./mvnw package -Dquarkus.package.jar.type=uber-jar
34-
```
35-
36-
The application, packaged as an _über-jar_, is now runnable using `java -jar target/*-runner.jar`.
37-
38-
## Creating a native executable
39-
40-
You can create a native executable using:
41-
42-
```shell script
43-
./mvnw package -Dnative
44-
```
45-
46-
Or, if you don't have GraalVM installed, you can run the native executable build in a container using:
47-
48-
```shell script
49-
./mvnw package -Dnative -Dquarkus.native.container-build=true
50-
```
51-
52-
You can then execute your native executable with: `./target/code-with-quarkus-1.0.0-SNAPSHOT-runner`
53-
54-
If you want to learn more about building native executables, please consult <https://quarkus.io/guides/maven-tooling>.
55-
56-
## Provided Code
57-
58-
### REST
59-
60-
Easily start your REST Web Services
11+
Dit genereert `target/generated/openapi/openapi.json` op basis van de classes in [`src/main/java/org/acme/`](src/main/java/org/acme/).
12+
Daar kun je de verscheidene annotations bekijken die gebruikt worden om API's te documenteren.
13+
Tevens is er enkele configuratie vereist in [`src/main/resources/application.properties`](src/main/resources/application.properties) om Quarkus goed in te stellen.
6114

62-
[Related guide section...](https://quarkus.io/guides/getting-started-reactive#reactive-jax-rs-resources)
15+
Met deze annotations en configuratie voldoet het example aan alle regels van de API Design Rules.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/sh
2+
CURRENT_DIRECTORY=$(dirname "$0")
3+
4+
cd $CURRENT_DIRECTORY
5+
6+
./mvnw --no-transfer-progress package
7+
8+
../run-spectral-linter.sh $(realpath target/generated/openapi/openapi.json)

examples/quarkus/run-spectral-linter.sh

Lines changed: 0 additions & 4 deletions
This file was deleted.

examples/quarkus/src/main/docker/Dockerfile.jvm

Lines changed: 0 additions & 98 deletions
This file was deleted.

examples/quarkus/src/main/docker/Dockerfile.legacy-jar

Lines changed: 0 additions & 94 deletions
This file was deleted.

0 commit comments

Comments
 (0)