diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml new file mode 100644 index 00000000..5cb9a135 --- /dev/null +++ b/.github/workflows/cd.yml @@ -0,0 +1,47 @@ +name: CD + +on: + push: + paths: + - 'VERSION' + +jobs: + release: + uses: jeffersonlab/java-workflows/.github/workflows/gh-release.yml@v1 + with: + files: smoothness-demo/build/libs/smoothness-demo.war + secrets: inherit + + artifact_publish: + needs: + - release + uses: jeffersonlab/java-workflows/.github/workflows/maven-publish.yml@v1 + secrets: inherit + + docs_publish: + needs: + - release + uses: jeffersonlab/java-workflows/.github/workflows/gh-pages-publish.yml@v1 + with: + semvertag: ${{ needs.release.outputs.semvertag }} + folder: smoothness-weblib/build/docs + secrets: inherit + + docker_publish: + needs: + - release + uses: jeffersonlab/container-workflows/.github/workflows/docker-publish.yml@v1 + with: + semvertag: ${{ needs.release.outputs.semvertag }} + images: jeffersonlab/${{ github.event.repository.name }}-demo + secrets: inherit + + acctest_deploy: + needs: + - release + uses: jeffersonlab/general-workflows/.github/workflows/jlab-deploy-app.yml@v1 + with: + app: smoothness-demo + env: acctest + ver: ${{ needs.release.outputs.semver }} + secrets: inherit diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d68263f6..5398225a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,6 +3,10 @@ name: CI on: push: branches: [ main ] + paths-ignore: + - 'VERSION' + tags-ignore: + - "v*.*.*" pull_request: branches: [ main ] workflow_dispatch: @@ -11,16 +15,5 @@ permissions: contents: read jobs: - ci: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 - with: - distribution: temurin - java-version: 17 - - uses: gradle/gradle-build-action@v2 - with: - gradle-version: wrapper - - name: Build with Gradle - run: ./gradlew build + build: + uses: jeffersonlab/java-workflows/.github/workflows/unit-ci.yml@v1 diff --git a/.github/workflows/docker-description.yml b/.github/workflows/docker-description.yml index 5452d314..0a953976 100644 --- a/.github/workflows/docker-description.yml +++ b/.github/workflows/docker-description.yml @@ -9,14 +9,8 @@ on: - .github/workflows/docker-description.yml jobs: dockerHubDescription: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: Docker Hub Description - uses: peter-evans/dockerhub-description@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - repository: jeffersonlab/${{ github.event.repository.name }}-demo - short-description: ${{ github.event.repository.description }} + uses: jeffersonlab/container-workflows/.github/workflows/docker-description.yml@v1 + with: + repository: jeffersonlab/${{ github.event.repository.name }}-demo + description: ${{ github.event.repository.description }} + secrets: inherit diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml deleted file mode 100644 index 28e42868..00000000 --- a/.github/workflows/docker-publish.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Publish to DockerHub - -on: - release: - types: [published] - workflow_dispatch: - -jobs: - push_to_registry: - name: Push Docker image to Docker Hub - runs-on: ubuntu-latest - steps: - - - name: Checkout - uses: actions/checkout@v3 - - - name: Docker meta - id: meta - uses: docker/metadata-action@v4 - with: - images: | - jeffersonlab/${{ github.event.repository.name }}-demo - tags: | - type=semver,pattern={{version}} - - - name: Login to DockerHub - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Push to Docker Hub - uses: docker/build-push-action@v3 - with: - push: true - build-args: | - CUSTOM_CRT_URL=http://pki.jlab.org/JLabCA.crt - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/gh-pages-publish.yml b/.github/workflows/gh-pages-publish.yml deleted file mode 100644 index f6293eda..00000000 --- a/.github/workflows/gh-pages-publish.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: Publish to gh-pages - -on: - release: - types: [published] - workflow_dispatch: - -permissions: - contents: write - -jobs: - publish: - runs-on: ubuntu-latest - concurrency: - group: docs-${{ github.ref }} - cancel-in-progress: true - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Setup Java - uses: actions/setup-java@v3 - with: - distribution: temurin - java-version: 17 - - name: Setup Gradle - uses: gradle/gradle-build-action@v2 - with: - gradle-version: wrapper - - name: Gradle doc tasks - run: ./gradlew javadoc tlddoc - - name: Deploy Docs - uses: JamesIves/github-pages-deploy-action@v4 - with: - folder: smoothness-weblib/build/docs - target-folder: ${{ github.ref_name }} \ No newline at end of file diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml deleted file mode 100644 index 6de7bff6..00000000 --- a/.github/workflows/maven-publish.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Publish to Maven Central - -on: - release: - types: [published] - workflow_dispatch: - -jobs: - publish: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Set up JDK - uses: actions/setup-java@v3 - with: - java-version: '17' - distribution: temurin - - uses: gradle/gradle-build-action@v2 - with: - gradle-version: wrapper - - name: Publish - run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository - env: - ORG_GRADLE_PROJECT_sonatypeUsername : ${{ secrets.OSSRH_USERNAME }} - ORG_GRADLE_PROJECT_sonatypePassword : ${{ secrets.OSSRH_PASSWORD }} - ORG_GRADLE_PROJECT_signingKey : ${{ secrets.SIGNING_KEY }} - ORG_GRADLE_PROJECT_signingPassword : ${{ secrets.SIGNING_PASSWORD }} \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 08167266..2eeee889 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,7 +17,7 @@ RUN cd /app && gradle build -x test --no-watch-fs $OPTIONAL_CERT_ARG ################## Stage 1 FROM ${RUN_IMAGE} as runner -COPY --from=builder /app/docker/app/app-setup.env / +COPY --from=builder /app/container/app/app-setup.env / USER root RUN /server-setup.sh /app-setup.env wildfly_start_and_wait \ && /app-setup.sh /app-setup.env config_keycloak_client \ diff --git a/README.md b/README.md index decc73c4..1c9d60b4 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ Check the [Release Notes](https://github.com/JeffersonLab/smoothness/releases) t ### Demo Install This application requires a Java 11+ JVM and standard library to run, plus a Java EE 8+ application server (developed with Wildfly). Use the Docker Compose quickstart to automate the setup of the app, else manually: -1. Install service [dependencies](https://github.com/JeffersonLab/smoothness/blob/main/deps.yml) +1. Install service [dependencies](https://github.com/JeffersonLab/smoothness/blob/main/deps.yaml) 2. Download [Wildfly 26.1.3](https://www.wildfly.org/downloads/) 3. [Configure](https://github.com/JeffersonLab/smoothness#configure) Wildfly and start it 4. Download [demo.war](https://github.com/JeffersonLab/smoothness-demo/releases) and deploy it to Wildfly @@ -142,7 +142,7 @@ gradlew build ## Develop In order to iterate rapidly when making changes it's often useful to run the app directly on the local workstation, perhaps leveraging an IDE. In this scenario run the service dependencies with: ``` -docker compose -f deps.yml up +docker compose -f deps.yaml up ``` **Note**: The local install of Wildfly should be [configured](https://github.com/JeffersonLab/smoothness#configure) to proxy connections to services via localhost and therefore the environment variables should contain: ``` @@ -158,12 +158,12 @@ Since this is a monorepo there are actually two projects: the weblib and the dem Dependencies (libraries) generally should be installed directly into Wildfly as opposed to being bundled inside a war file, but the smoothness weblib itself should not and must be packaged inside the war file of each app using the lib. This is necessary as the smoothness weblib is [incompatible as a JBoss Module](https://github.com/JeffersonLab/smoothness/issues/4), plus this bundling makes development of the lib easier as it allows iteration without constantly updating weblib code installed in Wildfly. Since the demo has a dependency on the weblib, either all artifacts needed for both subprojects need to tagged together, else two separate releases would be needed as a release corresponds to a git tag and Docker images are built using the Git tag context. We use a shared release. -1. During development the build is run locally to ensure everything is working. You can use deps.yml Docker Compose in concert with a local Wildfly instance to quickly iterate. +1. During development the build is run locally to ensure everything is working. You can use deps.yaml Docker Compose in concert with a local Wildfly instance to quickly iterate. 2. To confirm the new demo Docker image is good, run the docker build and test locally: ``` -docker compose -f build.yml build demo --no-cache --progress=plain +docker compose -f build.yaml build demo --no-cache --progress=plain ... -docker compose -f build.yml up +docker compose -f build.yaml up ``` 3. Bump the version number and release date in settings.gradle and commit and push to GitHub (using [Semantic Versioning](https://semver.org/)). 4. Create a new release on the GitHub [Releases](https://github.com/JeffersonLab/smoothness/releases) page corresponding to same version in settings.gradle (Enumerate changes and link issues). Attach the smoothness-demo.war. @@ -171,7 +171,7 @@ docker compose -f build.yml up 7. [Publish to gh-pages](https://github.com/JeffersonLab/smoothness/actions/workflows/gh-pages-publish.yml) GitHub Action should run automatically. 8. [Publish to DockerHub](https://github.com/JeffersonLab/smoothness/actions/workflows/docker-publish.yml) GitHub Action should run automatically. 9. Copy updated minified JS and CSS to any CDN as needed. -10. Bump and commit quick start [image version](https://github.com/JeffersonLab/smoothness/blob/main/docker-compose.override.yml). For the demo. +10. Bump and commit quick start [image version](https://github.com/JeffersonLab/smoothness/blob/main/compose.override.yaml). For the demo. ## Deploy At JLab this app is found at [ace.jlab.org/smoothness-demo](https://ace.jlab.org/smoothness-demo) and internally at [acctest.acc.jlab.org/smoothness-demo](https://acctest.acc.jlab.org/smoothness-demo). However, those servers are proxies for `wildfly5.acc.jlab.org` and `wildflytest5.acc.jlab.org` respectively. A [deploy script](https://github.com/JeffersonLab/wildfly/blob/main/scripts/deploy.sh) is provided to automate wget and deploy. Example: diff --git a/VERSION b/VERSION new file mode 100644 index 00000000..ae153944 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +4.5.0 \ No newline at end of file diff --git a/bind.yml b/bind.yaml similarity index 67% rename from bind.yml rename to bind.yaml index 0ba1f1fe..db0acb91 100644 --- a/bind.yml +++ b/bind.yaml @@ -1,30 +1,30 @@ services: oracle: extends: - file: build.yml + file: build.yaml service: oracle keycloak: extends: - file: build.yml + file: build.yaml service: keycloak puppet: extends: - file: build.yml + file: build.yaml service: puppet mailhog: extends: - file: build.yml + file: build.yaml service: mailhog weblib: extends: - file: build.yml + file: build.yaml service: weblib demo: extends: - file: build.yml + file: build.yaml service: demo \ No newline at end of file diff --git a/build.yml b/build.yaml similarity index 74% rename from build.yml rename to build.yaml index 13fd434c..d7ee61e0 100644 --- a/build.yml +++ b/build.yaml @@ -1,29 +1,29 @@ services: oracle: extends: - file: docker-compose.yml + file: compose.yaml service: oracle volumes: - ./run/oracle/oradata:/opt/oracle/oradata keycloak: extends: - file: docker-compose.yml + file: compose.yaml service: keycloak puppet: extends: - file: docker-compose.yml + file: compose.yaml service: puppet mailhog: extends: - file: docker-compose.yml + file: compose.yaml service: mailhog demo: extends: - file: docker-compose.yml + file: compose.yaml service: demo build: context: . diff --git a/docker-compose.override.yml b/compose.override.yaml similarity index 100% rename from docker-compose.override.yml rename to compose.override.yaml diff --git a/docker-compose.yml b/compose.yaml similarity index 93% rename from docker-compose.yml rename to compose.yaml index cf3a486c..40fe6dde 100644 --- a/docker-compose.yml +++ b/compose.yaml @@ -1,22 +1,22 @@ services: oracle: extends: - file: deps.yml + file: deps.yaml service: oracle keycloak: extends: - file: deps.yml + file: deps.yaml service: keycloak puppet: extends: - file: deps.yml + file: deps.yaml service: puppet mailhog: extends: - file: deps.yml + file: deps.yaml service: mailhog demo: diff --git a/docker/app/app-setup.env b/container/app/app-setup.env similarity index 100% rename from docker/app/app-setup.env rename to container/app/app-setup.env diff --git a/container/keycloak/initd.d/00_config.env b/container/keycloak/initd.d/00_config.env new file mode 100644 index 00000000..9dddf4eb --- /dev/null +++ b/container/keycloak/initd.d/00_config.env @@ -0,0 +1,2 @@ +export KEYCLOAK_REALM=test-realm +export KEYCLOAK_RESOURCE=smoothness-demo \ No newline at end of file diff --git a/container/keycloak/initd.d/01_login.sh b/container/keycloak/initd.d/01_login.sh new file mode 100755 index 00000000..b12855aa --- /dev/null +++ b/container/keycloak/initd.d/01_login.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +. /lib.sh + +echo "---------" +echo "| Login |" +echo "---------" +login \ No newline at end of file diff --git a/container/keycloak/initd.d/02_realm.sh b/container/keycloak/initd.d/02_realm.sh new file mode 100755 index 00000000..0c53e28b --- /dev/null +++ b/container/keycloak/initd.d/02_realm.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +. /lib.sh + +echo "----------------" +echo "| Create Realm |" +echo "----------------" +# KEYCLOAK_REALM set in 00_config.env as it's a shared value +KEYCLOAK_SECRET=yHi6W2raPmLvPXoxqMA7VWbLAA2WN0eB +KEYCLOAK_REALM_DISPLAY_NAME="TEST REALM" +# TIMEOUT UNITS IS SECONDS; 28800 Seconds = 8 Hours +KEYCLOAK_SESSION_IDLE_TIMEOUT=28800 +# 86400 Seconds = 24 Hours +KEYCLOAK_SESSION_MAX_LIFESPAN=86400 +create_realm \ No newline at end of file diff --git a/container/keycloak/initd.d/03_client.sh b/container/keycloak/initd.d/03_client.sh new file mode 100755 index 00000000..7bc0597d --- /dev/null +++ b/container/keycloak/initd.d/03_client.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +. /lib.sh + +echo "-----------------" +echo "| Create Client |" +echo "-----------------" +# KEYCLOAK_RESOURCE set in 00_config.env as it's a shared value +KEYCLOAK_CLIENT_NAME=smoothness-demo +KEYCLOAK_SERVICE_ACCOUNT_ENABLED=true +KEYCLOAK_REDIRECT_URIS='["https://localhost:8443/smoothness-demo/*"]' +KEYCLOAK_SECRET=yHi6W2raPmLvPXoxqMA7VWbLAA2WN0eB +create_client \ No newline at end of file diff --git a/container/keycloak/initd.d/04_accounts.sh b/container/keycloak/initd.d/04_accounts.sh new file mode 100755 index 00000000..10dc022a --- /dev/null +++ b/container/keycloak/initd.d/04_accounts.sh @@ -0,0 +1,42 @@ +#!/bin/bash + +. /lib.sh + +echo "----------------" +echo "| Create Roles |" +echo "----------------" +KEYCLOAK_ROLE_NAME=${KEYCLOAK_RESOURCE}-user +create_role +KEYCLOAK_ROLE_NAME=${KEYCLOAK_RESOURCE}-admin +create_role + + +echo "----------------" +echo "| Create Users |" +echo "----------------" +KEYCLOAK_USERNAME=jadams +KEYCLOAK_FIRSTNAME=Jane +KEYCLOAK_LASTNAME=Adams +KEYCLOAK_EMAIL=jadams@example.com +KEYCLOAK_PASSWORD=password +KEYCLOAK_ROLE_NAME=${KEYCLOAK_RESOURCE}-user +create_user +assign_role + +KEYCLOAK_USERNAME=jsmith +KEYCLOAK_FIRSTNAME=John +KEYCLOAK_LASTNAME=Smith +KEYCLOAK_EMAIL=jsmith@example.com +create_user +assign_role + + +KEYCLOAK_USERNAME=tbrown +KEYCLOAK_FIRSTNAME=Tom +KEYCLOAK_LASTNAME=Brown +KEYCLOAK_EMAIL=tbrown@example.com +create_user +KEYCLOAK_ROLE_NAME=${KEYCLOAK_RESOURCE}-user +assign_role +KEYCLOAK_ROLE_NAME=${KEYCLOAK_RESOURCE}-admin +assign_role \ No newline at end of file diff --git a/docker/oracle/setup/01_users.sql b/container/oracle/initdb.d/01_users.sql similarity index 100% rename from docker/oracle/setup/01_users.sql rename to container/oracle/initdb.d/01_users.sql diff --git a/docker/oracle/setup/02_ddl.sql b/container/oracle/initdb.d/02_ddl.sql similarity index 100% rename from docker/oracle/setup/02_ddl.sql rename to container/oracle/initdb.d/02_ddl.sql diff --git a/docker/oracle/setup/03_default_data.sql b/container/oracle/initdb.d/03_default_data.sql similarity index 100% rename from docker/oracle/setup/03_default_data.sql rename to container/oracle/initdb.d/03_default_data.sql diff --git a/deps.yml b/deps.yaml similarity index 94% rename from deps.yml rename to deps.yaml index 3bceb542..47daee45 100644 --- a/deps.yml +++ b/deps.yaml @@ -9,7 +9,7 @@ services: - "1521:1521" - "5500:5500" volumes: - - ./docker/oracle/setup:/container-entrypoint-initdb.d + - ./container/oracle/initdb.d:/container-entrypoint-initdb.d keycloak: image: quay.io/keycloak/keycloak:20.0.5 diff --git a/docker/keycloak/docker-entrypoint.sh b/docker/keycloak/docker-entrypoint.sh deleted file mode 100755 index 9eb3a070..00000000 --- a/docker/keycloak/docker-entrypoint.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash - -echo "--------------------------" -echo "| Step 1: Start Keycloak |" -echo "--------------------------" - -/opt/keycloak/bin/kc.sh start-dev --hostname $KEYCLOAK_FRONTEND_HOSTNAME --hostname-port=$KEYCLOAK_FRONTEND_PORT & - -echo "--------------------------------------" -echo "| Step 2: Wait for Keycloak to start |" -echo "--------------------------------------" - -if [[ -z "${KEYCLOAK_SERVER_URL}" ]]; then - echo "Skipping Keycloak Setup: Must provide KEYCLOAK_SERVER_URL in environment" - return 0 -fi - -until curl ${KEYCLOAK_SERVER_URL} -sf -o /dev/null; -do - echo $(date) " Still waiting for Keycloak to start..." - sleep 5 -done - -echo "---------------------" -echo "| Step 3: Configure |" -echo "---------------------" -/setup.sh - -echo "----------" -echo "| READY! |" -echo "----------" - -sleep infinity \ No newline at end of file diff --git a/docker/keycloak/setup.sh b/docker/keycloak/setup.sh deleted file mode 100755 index 1df58cd3..00000000 --- a/docker/keycloak/setup.sh +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/bash - -if [[ -z "${KEYCLOAK_HOME}" ]]; then - echo "Skipping Keycloak Setup: Must provide KEYCLOAK_HOME in environment" - return 0 -fi - -if [[ -z "${KEYCLOAK_SERVER_URL}" ]]; then - echo "Skipping Keycloak Setup: Must provide KEYCLOAK_SERVER_URL in environment" - return 0 -fi - -if [[ -z "${KEYCLOAK_ADMIN}" ]]; then - echo "Skipping Keycloak Setup: Must provide KEYCLOAK_ADMIN in environment" - return 0 -fi - -if [[ -z "${KEYCLOAK_ADMIN_PASSWORD}" ]]; then - echo "Skipping Keycloak Setup: Must provide KEYCLOAK_ADMIN_PASSWORD in environment" - return 0 -fi - -if [[ -z "${KEYCLOAK_REALM}" ]]; then - echo "Skipping Keycloak Setup: Must provide KEYCLOAK_REALM in environment" - return 0 -fi - -if [[ -z "${KEYCLOAK_RESOURCE}" ]]; then - echo "Skipping Keycloak Setup: Must provide KEYCLOAK_RESOURCE in environment" - return 0 -fi - -if [[ -z "${KEYCLOAK_SECRET}" ]]; then - echo "Skipping Keycloak Setup: Must provide KEYCLOAK_SECRET in environment" - return 0 -fi - -echo "-----------------" -echo "| Step A: Login |" -echo "-----------------" -${KEYCLOAK_HOME}/bin/kcadm.sh config credentials --server "${KEYCLOAK_SERVER_URL}" --realm master --user "${KEYCLOAK_ADMIN}" --password "${KEYCLOAK_ADMIN_PASSWORD}" - -echo "------------------------" -echo "| Step B: Create Realm |" -echo "------------------------" -${KEYCLOAK_HOME}/bin/kcadm.sh create realms -s realm="${KEYCLOAK_REALM}" -s enabled=true -o - -echo "------------------------" -echo "| Step C: Create Roles |" -echo "------------------------" -${KEYCLOAK_HOME}/bin/kcadm.sh create roles -r "${KEYCLOAK_REALM}" -s name=${KEYCLOAK_RESOURCE}-user -${KEYCLOAK_HOME}/bin/kcadm.sh create roles -r "${KEYCLOAK_REALM}" -s name=${KEYCLOAK_RESOURCE}-admin - -echo "-------------------------" -echo "| Step D: Create Client |" -echo "-------------------------" -${KEYCLOAK_HOME}/bin/kcadm.sh create clients -r "${KEYCLOAK_REALM}" -s clientId=${KEYCLOAK_RESOURCE} -s 'redirectUris=["https://localhost:8443/'${KEYCLOAK_RESOURCE}'/*"]' -s secret=${KEYCLOAK_SECRET} -s 'serviceAccountsEnabled=true' -${KEYCLOAK_HOME}/bin/kcadm.sh add-roles -r "${KEYCLOAK_REALM}" --uusername service-account-${KEYCLOAK_RESOURCE} --cclientid realm-management --rolename view-users -${KEYCLOAK_HOME}/bin/kcadm.sh add-roles -r "${KEYCLOAK_REALM}" --uusername service-account-${KEYCLOAK_RESOURCE} --cclientid realm-management --rolename view-authorization -${KEYCLOAK_HOME}/bin/kcadm.sh add-roles -r "${KEYCLOAK_REALM}" --uusername service-account-${KEYCLOAK_RESOURCE} --cclientid realm-management --rolename view-realm - -echo "------------------------" -echo "| Step E: Create Users |" -echo "------------------------" -${KEYCLOAK_HOME}/bin/kcadm.sh create users -r "${KEYCLOAK_REALM}" -s username=jadams -s firstName=Jane -s lastName=Adams -s email=jadams@example.com -s enabled=true -${KEYCLOAK_HOME}/bin/kcadm.sh set-password -r "${KEYCLOAK_REALM}" --username jadams --new-password password -${KEYCLOAK_HOME}/bin/kcadm.sh add-roles -r "${KEYCLOAK_REALM}" --uusername jadams --rolename ${KEYCLOAK_RESOURCE}-user - -${KEYCLOAK_HOME}/bin/kcadm.sh create users -r "${KEYCLOAK_REALM}" -s username=jsmith -s firstName=John -s lastName=Smith -s email=jsmith@example.com -s enabled=true -${KEYCLOAK_HOME}/bin/kcadm.sh set-password -r "${KEYCLOAK_REALM}" --username jsmith --new-password password -${KEYCLOAK_HOME}/bin/kcadm.sh add-roles -r "${KEYCLOAK_REALM}" --uusername jsmith --rolename ${KEYCLOAK_RESOURCE}-user - -${KEYCLOAK_HOME}/bin/kcadm.sh create users -r "${KEYCLOAK_REALM}" -s username=tbrown -s firstName=Tom -s lastName=Brown -s email=tbrown@example.com -s enabled=true -${KEYCLOAK_HOME}/bin/kcadm.sh set-password -r "${KEYCLOAK_REALM}" --username tbrown --new-password password -${KEYCLOAK_HOME}/bin/kcadm.sh add-roles -r "${KEYCLOAK_REALM}" --uusername tbrown --rolename ${KEYCLOAK_RESOURCE}-user -${KEYCLOAK_HOME}/bin/kcadm.sh add-roles -r "${KEYCLOAK_REALM}" --uusername tbrown --rolename ${KEYCLOAK_RESOURCE}-admin \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index ff827c94..516e3d20 100644 --- a/settings.gradle +++ b/settings.gradle @@ -3,6 +3,6 @@ include 'smoothness-weblib' include 'smoothness-demo' gradle.projectsLoaded({ - gradle.rootProject.version '4.5.0' - gradle.rootProject.ext.releaseDate = 'Sep 19 2023' + gradle.rootProject.version new File("./VERSION").text + gradle.rootProject.ext.releaseDate = new Date().format('MMM dd yyyy') }) \ No newline at end of file diff --git a/smoothness-weblib/build.gradle b/smoothness-weblib/build.gradle index e33bdc4a..315d5210 100644 --- a/smoothness-weblib/build.gradle +++ b/smoothness-weblib/build.gradle @@ -48,6 +48,8 @@ javadoc { } } +javadoc.finalizedBy(tlddoc) + task cssMinifyIt(type: org.gradlewebtools.minify.CssMinifyTask) { srcDir = project.file('src/main/resources/META-INF/resources/resources/css') dstDir = project.file('build')