Skip to content

Commit

Permalink
[WFLY-18612] adds support for optional provisioned-server, bootable-j…
Browse files Browse the repository at this point in the history
…ar and openshift profile build testing; and custom server_host param to test server provisioning
  • Loading branch information
emmartins committed Oct 12, 2023
1 parent 5654384 commit a344b8c
Show file tree
Hide file tree
Showing 13 changed files with 51 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/quickstart_batch-processing_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ jobs:
uses: ./.github/workflows/quickstart_ci.yml
with:
QUICKSTART_PATH: batch-processing
MICROPROFILE: false
TEST_PROVISIONED_SERVER: true
40 changes: 29 additions & 11 deletions .github/workflows/quickstart_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,26 @@ on:
description: 'the path to the quickstart to test'
required: true
type: string
MICROPROFILE:
description: 'if the quickstart is a microprofile one'
required: true
TEST_PROVISIONED_SERVER:
description: 'if the quickstart support for provisioned-server profile should be tested'
required: false
default: false
type: boolean
TEST_BOOTABLE_JAR:
description: 'if the quickstart support for bootable jar profile should be tested'
required: false
default: false
type: boolean
TEST_OPENSHIFT:
description: 'if the quickstart support for openshift profile should be tested'
required: false
default: true
type: boolean
SERVER_PROVISIONING_SERVER_HOST:
description: 'the server_host to be used when testing server provisioning with the mvn verify command'
required: false
default: 'http://localhost:8080'
type: string

# Only run the latest job
concurrency:
Expand Down Expand Up @@ -43,7 +59,7 @@ jobs:
mvn -U -B -fae clean install -Drelease
shell: bash
- name: Build, run & test ${{ inputs.QUICKSTART_PATH }} Quickstart with provisioned-server profile
if: ${{ !inputs.MICROPROFILE }}
if: ${{ inputs.TEST_PROVISIONED_SERVER }}
run: |
cd quickstarts
cd ${{ inputs.QUICKSTART_PATH }}
Expand All @@ -52,12 +68,12 @@ jobs:
echo "Starting provisioned server..."
mvn -U -B -fae wildfly:start -DjbossHome=target/server -Dstartup-timeout=120
echo "Testing provisioned server..."
mvn -U -B -fae verify -Dserver.host=http://localhost:8080 -Pintegration-testing
mvn -U -B -fae verify -Dserver.host=${{ inputs.SERVER_PROVISIONING_SERVER_HOST }} -Pintegration-testing
echo "Shutting down provisioned server..."
mvn -U -B -fae wildfly:shutdown
shell: bash
- name: Build, run & test ${{ inputs.QUICKSTART_PATH }} Quickstart with bootable-jar profile
if: ${{ inputs.MICROPROFILE }}
if: ${{ inputs.TEST_BOOTABLE_JAR }}
run: |
cd quickstarts
cd ${{ inputs.QUICKSTART_PATH }}
Expand All @@ -66,11 +82,12 @@ jobs:
echo "Starting bootable jar..."
mvn -U -B -fae wildfly-jar:start -Djar-file-name=target/${{ inputs.QUICKSTART_PATH }}-bootable.jar -Dstartup-timeout=120
echo "Testing bootable jar..."
mvn -U -B -fae verify -Dserver.host=http://localhost:8080 -Pintegration-testing
mvn -U -B -fae verify -Dserver.host=${{ inputs.SERVER_PROVISIONING_SERVER_HOST }} -Pintegration-testing
echo "Shutting down bootable jar..."
mvn -U -B -fae wildfly-jar:shutdown
shell: bash
- name: Build ${{ inputs.QUICKSTART_PATH }} Quickstart with openshift profile
if: ${{ inputs.TEST_OPENSHIFT }}
run: |
cd quickstarts
cd ${{ inputs.QUICKSTART_PATH }}
Expand Down Expand Up @@ -122,7 +139,7 @@ jobs:
mvn -U -B -fae clean package -Drelease -Dversion.server=${{ env.VERSION_SERVER }}
shell: bash
- name: Build, run & test ${{ inputs.QUICKSTART_PATH }} Quickstart with provisioned-server profile, and built Server version
if: ${{ !inputs.MICROPROFILE }}
if: ${{ inputs.TEST_PROVISIONED_SERVER }}
run: |
cd quickstarts
cd ${{ inputs.QUICKSTART_PATH }}
Expand All @@ -131,12 +148,12 @@ jobs:
echo "Starting provisioned server..."
mvn -U -B -fae wildfly:start -DjbossHome=target/server -Dstartup-timeout=120
echo "Testing provisioned server..."
mvn -U -B -fae verify -Dserver.host=http://localhost:8080 -Pintegration-testing
mvn -U -B -fae verify -Dserver.host=${{ inputs.SERVER_PROVISIONING_SERVER_HOST }} -Pintegration-testing
echo "Shutting down provisioned server..."
mvn -U -B -fae wildfly:shutdown
shell: bash
- name: Build, run & test ${{ inputs.QUICKSTART_PATH }} Quickstart with bootable-jar profile, and built Server version
if: ${{ inputs.MICROPROFILE }}
if: ${{ inputs.TEST_BOOTABLE_JAR }}
run: |
cd quickstarts
cd ${{ inputs.QUICKSTART_PATH }}
Expand All @@ -145,11 +162,12 @@ jobs:
echo "Starting bootable jar..."
mvn -U -B -fae wildfly-jar:start -Djar-file-name=target/${{ inputs.QUICKSTART_PATH }}-bootable.jar -Dstartup-timeout=120
echo "Testing bootable jar..."
mvn -U -B -fae verify -Dserver.host=http://localhost:8080 -Pintegration-testing
mvn -U -B -fae verify -Dserver.host=${{ inputs.SERVER_PROVISIONING_SERVER_HOST }} -Pintegration-testing
echo "Shutting down bootable jar..."
mvn -U -B -fae wildfly-jar:shutdown
shell: bash
- name: Build ${{ inputs.QUICKSTART_PATH }} Quickstart with openshift profile, and built Server version
if: ${{ inputs.TEST_OPENSHIFT }}
run: |
cd quickstarts
cd ${{ inputs.QUICKSTART_PATH }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/quickstart_helloworld-mdb_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ jobs:
uses: ./.github/workflows/quickstart_ci.yml
with:
QUICKSTART_PATH: helloworld-mdb
MICROPROFILE: false
TEST_PROVISIONED_SERVER: true
2 changes: 1 addition & 1 deletion .github/workflows/quickstart_helloworld_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ jobs:
uses: ./.github/workflows/quickstart_ci.yml
with:
QUICKSTART_PATH: helloworld
MICROPROFILE: false
TEST_PROVISIONED_SERVER: true
2 changes: 1 addition & 1 deletion .github/workflows/quickstart_kitchensink_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ jobs:
uses: ./.github/workflows/quickstart_ci.yml
with:
QUICKSTART_PATH: kitchensink
MICROPROFILE: false
TEST_PROVISIONED_SERVER: true
2 changes: 1 addition & 1 deletion .github/workflows/quickstart_microprofile-config_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ jobs:
uses: ./.github/workflows/quickstart_ci.yml
with:
QUICKSTART_PATH: microprofile-config
MICROPROFILE: true
TEST_BOOTABLE_JAR: true
2 changes: 1 addition & 1 deletion .github/workflows/quickstart_microprofile-jwt_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ jobs:
uses: ./.github/workflows/quickstart_ci.yml
with:
QUICKSTART_PATH: microprofile-jwt
MICROPROFILE: true
TEST_BOOTABLE_JAR: true
2 changes: 1 addition & 1 deletion .github/workflows/quickstart_microprofile-openapi_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ jobs:
uses: ./.github/workflows/quickstart_ci.yml
with:
QUICKSTART_PATH: microprofile-openapi
MICROPROFILE: true
TEST_BOOTABLE_JAR: true
2 changes: 1 addition & 1 deletion .github/workflows/quickstart_numberguess_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ jobs:
uses: ./.github/workflows/quickstart_ci.yml
with:
QUICKSTART_PATH: numberguess
MICROPROFILE: false
TEST_PROVISIONED_SERVER: true
2 changes: 1 addition & 1 deletion .github/workflows/quickstart_temperature-converter_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ jobs:
uses: ./.github/workflows/quickstart_ci.yml
with:
QUICKSTART_PATH: temperature-converter
MICROPROFILE: false
TEST_PROVISIONED_SERVER: true
2 changes: 1 addition & 1 deletion .github/workflows/quickstart_thread-racing_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ jobs:
uses: ./.github/workflows/quickstart_ci.yml
with:
QUICKSTART_PATH: thread-racing
MICROPROFILE: false
TEST_PROVISIONED_SERVER: true
9 changes: 6 additions & 3 deletions shared-doc/run-integration-tests-with-bootable-jar.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,14 @@ $ mvn clean package -Pbootable-jar
$ mvn wildfly-jar:start -Djar-file-name=target/{artifactId}-bootable.jar
----

. Type the following command to run the `verify` goal with the `integration-testing` profile activated, and specifying the quickstart's URL using the `server.host` system property, which for a bootable jar by default is `http://localhost:8080`.
ifndef::server_provisioning_server_host[]
:server_provisioning_server_host: http://localhost:8080
endif::server_provisioning_server_host[]
. Type the following command to run the `verify` goal with the `integration-testing` profile activated, and specifying the quickstart's URL using the `server.host` system property, which for a bootable jar by default is `{server_provisioning_server_host}`.
+
[source,options="nowrap"]
[source,subs="attributes+",options="nowrap"]
----
$ mvn verify -Pintegration-testing -Dserver.host=http://localhost:8080
$ mvn verify -Pintegration-testing -Dserver.host={server_provisioning_server_host}
----

. Shutdown the {productName} bootable jar, this time using the {productName} Maven Jar Plugin too.
Expand Down
9 changes: 6 additions & 3 deletions shared-doc/run-integration-tests-with-provisioned-server.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,14 @@ $ mvn clean package -Pprovisioned-server
$ mvn wildfly:start -DjbossHome=target/server
----

. Type the following command to run the `verify` goal with the `integration-testing` profile activated, and specifying the quickstart's URL using the `server.host` system property, which for a provisioned server by default is `http://localhost:8080`.
ifndef::server_provisioning_server_host[]
:server_provisioning_server_host: http://localhost:8080
endif::server_provisioning_server_host[]
. Type the following command to run the `verify` goal with the `integration-testing` profile activated, and specifying the quickstart's URL using the `server.host` system property, which for a provisioned server by default is `{server_provisioning_server_host}`.
+
[source,options="nowrap"]
[source,subs="attributes+",options="nowrap"]
----
$ mvn verify -Pintegration-testing -Dserver.host=http://localhost:8080
$ mvn verify -Pintegration-testing -Dserver.host={server_provisioning_server_host}
----

. Shutdown the {productName} provisioned server, this time using the {productName} Maven Plugin too.
Expand Down

0 comments on commit a344b8c

Please sign in to comment.