diff --git a/.github/workflows/initializr-build.yml b/.github/workflows/initializr-build.yml index bd763184..2b7b2522 100644 --- a/.github/workflows/initializr-build.yml +++ b/.github/workflows/initializr-build.yml @@ -36,6 +36,8 @@ jobs: distribution: 'temurin' - name: Build Initializr run: ./gradlew --build-cache --configure-on-demand --no-daemon clean build -x test -x javadoc -x check --parallel + - name: Validate Initializr + run: ./ci/validate-initializr.sh - uses: actions/upload-artifact@v3 with: name: binary-artifacts diff --git a/app/src/main/java/org/apereo/cas/initializr/contrib/TemplatedProjectContributor.java b/app/src/main/java/org/apereo/cas/initializr/contrib/TemplatedProjectContributor.java index 27c33f2a..a09af102 100644 --- a/app/src/main/java/org/apereo/cas/initializr/contrib/TemplatedProjectContributor.java +++ b/app/src/main/java/org/apereo/cas/initializr/contrib/TemplatedProjectContributor.java @@ -75,6 +75,10 @@ private static void handleApplicationServerType(final ProjectDescription project } else if (dependencies.containsKey("webapp-undertow")) { appServer = "-undertow"; } + if (dependencies.containsKey("webapp")) { + appServer = ""; + } + defaults.put("appServer", appServer); } diff --git a/app/src/main/resources/common/gitignore b/app/src/main/resources/common/gitignore index 0ea49c30..45840be3 100644 --- a/app/src/main/resources/common/gitignore +++ b/app/src/main/resources/common/gitignore @@ -17,7 +17,6 @@ bin/ *.iml *.log tmp/ -.java-version ./apache-tomcat apache-tomcat.zip config-metadata.properties diff --git a/ci/validate-initializr.sh b/ci/validate-initializr.sh new file mode 100755 index 00000000..0ae7f6c2 --- /dev/null +++ b/ci/validate-initializr.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +set -e + +source ./ci/functions.sh + +echo "Building CAS Initializr" +./gradlew --build-cache --configure-on-demand --no-daemon \ + clean build -x test -x javadoc -x check --parallel -q + +echo "Launching CAS Initializr" +java -jar app/build/libs/app.jar & +pid=$! +sleep 20 + +echo "Checking CAS Initializr metadata" +curl -H 'Accept: application/json' http://localhost:8080 | jq + +echo "Checking CAS Initializr dependencies" +curl -H 'Accept: application/json' http://localhost:8080/dependencies | jq + +echo "Checking CAS Initializr info" +curl -H 'Accept: application/json' http://localhost:8080/actuator/info | jq + +echo "Checking CAS Initializr supported versions" +curl -H 'Accept: application/json' http://localhost:8080/actuator/supportedVersions | jq + +echo "Checking CAS Initializr UI" +curl http://localhost:8080/ui + +echo "\nAll CAS Initializr checks have passed" + +kill -9 $pid +[ "$CI" = "true" ] && pkill java diff --git a/ic.sh b/ic.sh index 933a4fb5..791da9cf 100755 --- a/ic.sh +++ b/ic.sh @@ -3,7 +3,7 @@ rm -Rf ./tmp CAS_VERSION="7.0.0-SNAPSHOT" -BOOT_VERSION="2.7.4" +BOOT_VERSION="3.0.0" #CAS_VERSION="6.3.7.2" #BOOT_VERSION="2.3.7.RELEASE"