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

JDK21 and examples in CI, upgrade to Galleon 6.0.0.Final #387

Merged
merged 5 commits into from
Apr 11, 2024
Merged
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
24 changes: 17 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,17 @@ on:
push:
branches:
- '**'
paths-ignore:
- 'examples/**'
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths-ignore:
- 'examples/**'

# Only run the latest job
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true

jobs:
build:
Expand All @@ -19,7 +27,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest ]
java: ['11', '17']
java: ['11', '17', '21']

steps:
- uses: actions/checkout@v2
Expand All @@ -30,34 +38,36 @@ jobs:
restore-keys: |
${{ runner.os }}-maven-
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
cache: 'maven'
- name: Build and Test on ${{ matrix.java }}
# Some tests start the server with large default configurations, on Windows CI it has been observed some failure caused by reaching mem limits.
run: mvn clean install '-Dtest.jvm.args=-Xms1g -Xmx1g -Dorg.wildfly.logging.skipLogManagerCheck=true' '-Dorg.wildfly.bootable.jar.ci.execution=true'
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
if: failure()
with:
name: surefire-reports-${{ matrix.os }}-${{ matrix.java }}
path: |
!**/bootable-jar-build-artifacts/**
**/surefire-reports/*.txt
- uses: actions/upload-artifact@v2
**/surefire-reports/
- uses: actions/upload-artifact@v4
if: failure()
with:
name: server-logs-${{ matrix.os }}-${{ matrix.java }}
path: |
!**/bootable-jar-build-artifacts/**
**/server.log
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
if: failure()
with:
name: devwatch-logs-${{ matrix.os }}-${{ matrix.java }}
path: |
!**/bootable-jar-build-artifacts/**
**/dev-watch-test-output.txt
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
if: failure()
with:
name: logs-${{ matrix.os }}-${{ matrix.java }}
Expand Down
70 changes: 70 additions & 0 deletions .github/workflows/examples-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: WildFly JAR Maven Plugin Examples - CI

on:
push:
branches:
- '**'
pull_request:
types: [opened, synchronize, reopened, ready_for_review]

# Only run the latest job
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true

jobs:
build:
name: ${{ matrix.os }}-jdk${{ matrix.java }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest ]
java: ['11', '17', '21']

steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
cache: 'maven'
- name: Build and Test Examples on ${{ matrix.java }}
# We first build the project, then we build the examples
run: |
mvn -B -ntp clean install -DskipTests
cd examples
mvn -B -ntp clean install
- name: Build and Test Examples that require JDK 17 on ${{ matrix.java }}
if: matrix.java != '11'
run: |
cd examples/mdb-rar
mvn -B -ntp clean install
cd ../gradle-mdb-rar
./gradlew clean build
- uses: actions/upload-artifact@v4
if: failure()
with:
name: surefire-reports-${{ matrix.os }}-${{ matrix.java }}
path: |
!**/bootable-jar-build-artifacts/**
**/surefire-reports/
- uses: actions/upload-artifact@v4
if: failure()
with:
name: server-logs-${{ matrix.os }}-${{ matrix.java }}
path: |
!**/bootable-jar-build-artifacts/**
**/server.log
- uses: actions/upload-artifact@v4
if: failure()
with:
name: logs-${{ matrix.os }}-${{ matrix.java }}
path: |
!**/bootable-jar-build-artifacts/**
**/tests/**/logs/**

4 changes: 1 addition & 3 deletions examples/arquillian/hollow-jar/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ In this scenario, part of the Arquillian test is run as a client

The Arquillian XML descriptor is located in _src/test/resources/arquillian.xml_

Build, test and run
Build and run tests
===================

* To build and run tests: `mvn clean verify`
* To run: `mvn wildfly-jar:run`
* Access the application: `http://127.0.0.1:8080/hello`
10 changes: 4 additions & 6 deletions examples/ejb-in-ear/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,19 @@ Build and run on OpenShift

* `mvn package -Popenshift`
* mkdir os && cp ear/target/ejb-in-ear-bootable.jar os/
* Import the OpenJDK 11 image to run the Java application, create the image stream and deployment:
* Import the OpenJDK 17 image to run the Java application, create the image stream and deployment:
```
oc import-image ubi8/openjdk-11 --from=registry.redhat.io/ubi8/openjdk-11 --confirm
oc import-image ubi8/openjdk-17 --from=registry.redhat.io/ubi8/openjdk-17 --confirm

oc new-build --strategy source --binary --image-stream openjdk-11 --name ejb-in-ear-bootable-jar
oc new-build --strategy source --binary --image-stream openjdk-17 --name ejb-in-ear-bootable-jar

oc start-build ejb-in-ear-bootable-jar --from-dir ./os/
```

The build could take some time to end, so verify its status before creating the application, for example, checks the logs of the build pod.

```
oc new-app --name ejb-in-ear-bootable-jar-app \
--env GC_METASPACE_SIZE=96 \
ejb-in-ear-bootable-jar
oc new-app --name ejb-in-ear-bootable-jar-app ejb-in-ear-bootable-jar

oc expose svc/ejb-in-ear-bootable-jar-app
```
Expand Down
6 changes: 3 additions & 3 deletions examples/ejb-in-war/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ Build and run on OpenShift

* mvn package -Popenshift
* mkdir os && cp target/ejb-in-war-bootable.jar os/
* Import the OpenJDK 11 image to run the Java application, create the image stream and deployment:
* Import the OpenJDK 17 image to run the Java application, create the image stream and deployment:
```
oc import-image ubi8/openjdk-11 --from=registry.redhat.io/ubi8/openjdk-11 --confirm
oc import-image ubi8/openjdk-17 --from=registry.redhat.io/ubi8/openjdk-17 --confirm

oc new-build --strategy source --binary --image-stream openjdk-11 --name ejb-bootable-jar
oc new-build --strategy source --binary --image-stream openjdk-17 --name ejb-bootable-jar

oc start-build ejb-bootable-jar --from-dir ./os/

Expand Down
2 changes: 1 addition & 1 deletion examples/ejb-persistent-clustered-timers/helm.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
build:
uri: https://github.com/wildfly-extras/wildfly-jar-maven-plugin.git
ref: 7.0.1.Final
ref: 11.0.0.Beta2
contextDir: examples
mode: bootable-jar
env:
Expand Down
4 changes: 2 additions & 2 deletions examples/elytron-oidc-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ NB: In order for the deployment to be identified as "secured with OIDC", the `au
Initial Steps
=======

* Download the keycloak server from: `https://www.keycloak.org/download` (Quarkus build, 19+)
* Download the keycloak server from: `https://www.keycloak.org/downloads` (24.0.2)
* Start the keycloak server to listen on port 8080: `bin/kc.sh start-dev`
* Log into the keycloak server admin console (you will possibly be asked to create an initial admin user) : `http://127.0.0.1:8080/`
* Create a Realm named `WildFly`
* Create a Role named `Users`
* Create a User named `demo`, password `demo`
* Assign the role `Users` to the user `demo`
* Create a Client named `simple-webapp` with Root URL: `http://127.0.0.1:8090/simple-webapp` and Redirect url: `http://127.0.0.1:8090/simple-webapp/*`
* Create a Client named `simple-webapp` with Root URL: `http://127.0.0.1:8090/simple-webapp`

Build and run
========
Expand Down
3 changes: 2 additions & 1 deletion examples/gradle-mdb-rar/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ java {
}

jar{
mustRunAfter("getRAR")
archiveBaseName = "gradle-demo"
exclude("*.cli")
exclude("*properties")
Expand Down Expand Up @@ -52,7 +53,7 @@ task mavenClean(type: Exec){
}
}
wrapper{
gradleVersion = '6.7'
gradleVersion = '8.7'
}


Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
7 changes: 4 additions & 3 deletions examples/https/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,12 @@ In this example, the keystore is not packaged in the bootable jar but mounted in
Steps:
* mvn package -Popenshift
* mkdir os && cp target/https-bootable.jar os/
* oc new-build --strategy source --binary --image-stream openjdk11 --name https-test
oc import-image ubi8/openjdk-17 --from=registry.redhat.io/ubi8/openjdk-17 --confirm
* oc new-build --strategy source --binary --image-stream openjdk-17 --name https-test
* oc start-build https-test --from-dir ./os/
* oc new-app https-test
* oc expose svc/https-test
* oc secrets new ks-secret extra-content/standalone/configuration/keystore.jks
* Create a secure route with Termination Type `passthrough`
* oc create secret generic ks-secret --from-file=extra-content/standalone/configuration/keystore.jks
* Mount the keystore secret on /etc/wf-secrets in the pod, update DeploymentConfig:
spec:
volumes:
Expand Down
2 changes: 1 addition & 1 deletion examples/jaxws/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Build and run

* To build: `mvn package`
* To run: `mvn wildfly-jar:run`
* Access the WSDL from any SOAP Client: `http://localhost:8080/jaxws-pojo-endpoint/JSEBean`
* Access the WSDL from any SOAP Client: `http://localhost:8080/jaxws-pojo-endpoint/JSEBean?wsdl`

* Send a SOAP Request. Ex.:

Expand Down
2 changes: 2 additions & 0 deletions examples/jib-layers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
We are using the packaged JAR and WAR support of Java Image Builder Jib.
This example separates the creation of a hollow bootable JAR Jib image from the application JIB image. This allows for efficient application image build. The bootable JAR is built only once.

WARNING: due to https://github.com/GoogleContainerTools/jib/issues/4134 you must use Docker.

* To build the hollow JAR JIB image

* cd server-layer
Expand Down
21 changes: 0 additions & 21 deletions examples/jib-operator/README.md

This file was deleted.

Loading
Loading