Skip to content

Commit

Permalink
Merge pull request #771 from emmartins/ci-deployment-dir
Browse files Browse the repository at this point in the history
[WFLY-18712] adds CI support for non root deployment dir
  • Loading branch information
emmartins authored Nov 2, 2023
2 parents 13d664e + 66bb41b commit b25c2fd
Showing 1 changed file with 29 additions and 24 deletions.
53 changes: 29 additions & 24 deletions .github/workflows/quickstart_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ on:
description: 'the path to the quickstart to test'
required: true
type: string
DEPLOYMENT_DIR:
description: 'the path to the deployment dir, relative to QUICKSTART_PATH'
required: false
default: '.'
type: string
TEST_PROVISIONED_SERVER:
description: 'if the quickstart support for provisioned-server profile should be tested'
required: false
Expand Down Expand Up @@ -88,46 +93,46 @@ jobs:
run: |
cd quickstarts
cd ${{ inputs.QUICKSTART_PATH }}
mvn -U -B -fae clean install -Drelease
mvn -fae clean install -Drelease
shell: bash
- name: Build, run & test ${{ inputs.QUICKSTART_PATH }} Quickstart with provisioned-server profile
if: ${{ inputs.TEST_PROVISIONED_SERVER }}
run: |
cd quickstarts
cd ${{ inputs.QUICKSTART_PATH }}
echo "Building provisioned server..."
mvn -U -B -fae clean package -Pprovisioned-server
mvn -fae clean package -Pprovisioned-server
echo "Add quickstartUser..."
target/server/bin/add-user.sh -a -u 'quickstartUser' -p 'quickstartPwd1!' -g 'guest,user,JBossAdmin,Users'
${{ inputs.DEPLOYMENT_DIR }}/target/server/bin/add-user.sh -a -u 'quickstartUser' -p 'quickstartPwd1!' -g 'guest,user,JBossAdmin,Users'
echo "Add quickstartAdmin..."
target/server/bin/add-user.sh -a -u 'quickstartAdmin' -p 'adminPwd1!' -g 'guest,user,admin'
${{ inputs.DEPLOYMENT_DIR }}/target/server/bin/add-user.sh -a -u 'quickstartAdmin' -p 'adminPwd1!' -g 'guest,user,admin'
echo "Starting provisioned server..."
mvn -U -B -fae wildfly:start -DjbossHome=target/server -Dstartup-timeout=120
mvn -f ${{ inputs.DEPLOYMENT_DIR }}/pom.xml wildfly:start -DjbossHome=${{ inputs.DEPLOYMENT_DIR }}/target/server -Dstartup-timeout=120
echo "Testing provisioned server..."
mvn -U -B -fae verify -Dserver.host=${{ inputs.SERVER_PROVISIONING_SERVER_HOST }} -Pintegration-testing
mvn -fae verify -Dserver.host=${{ inputs.SERVER_PROVISIONING_SERVER_HOST }} -Pintegration-testing
echo "Shutting down provisioned server..."
mvn -U -B -fae wildfly:shutdown
mvn -f ${{ inputs.DEPLOYMENT_DIR }}/pom.xml wildfly:shutdown
shell: bash
- name: Build, run & test ${{ inputs.QUICKSTART_PATH }} Quickstart with bootable-jar profile
if: ${{ inputs.TEST_BOOTABLE_JAR }}
run: |
cd quickstarts
cd ${{ inputs.QUICKSTART_PATH }}
echo "Building bootable jar..."
mvn -U -B -fae clean package -Pbootable-jar
mvn -fae clean package -Pbootable-jar
echo "Starting bootable jar..."
mvn -U -B -fae wildfly-jar:start -Djar-file-name=target/${{ inputs.QUICKSTART_PATH }}-bootable.jar -Dstartup-timeout=120
mvn -f ${{ inputs.DEPLOYMENT_DIR }}/pom.xml wildfly-jar:start -Djar-file-name=${{ inputs.DEPLOYMENT_DIR }}/target/${{ inputs.QUICKSTART_PATH }}-bootable.jar -Dstartup-timeout=120
echo "Testing bootable jar..."
mvn -U -B -fae verify -Dserver.host=${{ inputs.SERVER_PROVISIONING_SERVER_HOST }} -Pintegration-testing
mvn -fae verify -Dserver.host=${{ inputs.SERVER_PROVISIONING_SERVER_HOST }} -Pintegration-testing
echo "Shutting down bootable jar..."
mvn -U -B -fae wildfly-jar:shutdown
mvn -f ${{ inputs.DEPLOYMENT_DIR }}/pom.xml 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 }}
mvn -U -B -fae clean package -Popenshift
mvn -fae clean package -Popenshift
shell: bash
- name: Run after script
env:
Expand Down Expand Up @@ -193,46 +198,46 @@ jobs:
run: |
cd quickstarts
cd ${{ inputs.QUICKSTART_PATH }}
mvn -U -B -fae clean package -Drelease -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
mvn -fae clean package -Drelease -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
shell: bash
- name: Build, run & test ${{ inputs.QUICKSTART_PATH }} Quickstart with provisioned-server profile, and built Server version
if: ${{ inputs.TEST_PROVISIONED_SERVER }}
run: |
cd quickstarts
cd ${{ inputs.QUICKSTART_PATH }}
echo "Building provisioned server..."
mvn -U -B -fae clean package -Pprovisioned-server -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
mvn -fae clean package -Pprovisioned-server -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
echo "Add quickstartUser..."
target/server/bin/add-user.sh -a -u 'quickstartUser' -p 'quickstartPwd1!' -g 'guest,user,JBossAdmin,Users'
${{ inputs.DEPLOYMENT_DIR }}/target/server/bin/add-user.sh -a -u 'quickstartUser' -p 'quickstartPwd1!' -g 'guest,user,JBossAdmin,Users'
echo "Add quickstartAdmin..."
target/server/bin/add-user.sh -a -u 'quickstartAdmin' -p 'adminPwd1!' -g 'guest,user,admin'
${{ inputs.DEPLOYMENT_DIR }}/target/server/bin/add-user.sh -a -u 'quickstartAdmin' -p 'adminPwd1!' -g 'guest,user,admin'
echo "Starting provisioned server..."
mvn -U -B -fae wildfly:start -DjbossHome=target/server -Dstartup-timeout=120
mvn -f ${{ inputs.DEPLOYMENT_DIR }}/pom.xml wildfly:start -DjbossHome=${{ inputs.DEPLOYMENT_DIR }}/target/server -Dstartup-timeout=120
echo "Testing provisioned server..."
mvn -U -B -fae verify -Dserver.host=${{ inputs.SERVER_PROVISIONING_SERVER_HOST }} -Pintegration-testing
mvn -fae verify -Dserver.host=${{ inputs.SERVER_PROVISIONING_SERVER_HOST }} -Pintegration-testing
echo "Shutting down provisioned server..."
mvn -U -B -fae wildfly:shutdown
mvn -f ${{ inputs.DEPLOYMENT_DIR }}/pom.xml wildfly:shutdown
shell: bash
- name: Build, run & test ${{ inputs.QUICKSTART_PATH }} Quickstart with bootable-jar profile, and built Server version
if: ${{ inputs.TEST_BOOTABLE_JAR }}
run: |
cd quickstarts
cd ${{ inputs.QUICKSTART_PATH }}
echo "Building bootable jar..."
mvn -U -B -fae clean package -Pbootable-jar -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
mvn -fae clean package -Pbootable-jar -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
echo "Starting bootable jar..."
mvn -U -B -fae wildfly-jar:start -Djar-file-name=target/${{ inputs.QUICKSTART_PATH }}-bootable.jar -Dstartup-timeout=120
mvn -f ${{ inputs.DEPLOYMENT_DIR }}/pom.xml wildfly-jar:start -Djar-file-name=${{ inputs.DEPLOYMENT_DIR }}/target/${{ inputs.QUICKSTART_PATH }}-bootable.jar -Dstartup-timeout=120
echo "Testing bootable jar..."
mvn -U -B -fae verify -Dserver.host=${{ inputs.SERVER_PROVISIONING_SERVER_HOST }} -Pintegration-testing
mvn -fae verify -Dserver.host=${{ inputs.SERVER_PROVISIONING_SERVER_HOST }} -Pintegration-testing
echo "Shutting down bootable jar..."
mvn -U -B -fae wildfly-jar:shutdown
mvn -f ${{ inputs.DEPLOYMENT_DIR }}/pom.xml 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 }}
mvn -U -B -fae clean package -Popenshift -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
mvn -fae clean package -Popenshift -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
shell: bash
- name: Run after script
env:
Expand Down

0 comments on commit b25c2fd

Please sign in to comment.