From 16d3b7ef60cc982bae1bbe59e8cf7bb2b2b50070 Mon Sep 17 00:00:00 2001 From: Kabir Khan Date: Thu, 21 Dec 2023 17:12:06 +0000 Subject: [PATCH] Check add-user.sh exists before calling it --- .github/workflows/quickstart_ci.yml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/quickstart_ci.yml b/.github/workflows/quickstart_ci.yml index 5f5db8e3e9..c506eaaf48 100644 --- a/.github/workflows/quickstart_ci.yml +++ b/.github/workflows/quickstart_ci.yml @@ -102,10 +102,12 @@ jobs: cd ${{ inputs.QUICKSTART_PATH }} echo "Building provisioned server..." mvn -fae clean package -Pprovisioned-server - echo "Add quickstartUser..." - ${{ inputs.DEPLOYMENT_DIR }}/target/server/bin/add-user.sh -a -u 'quickstartUser' -p 'quickstartPwd1!' -g 'guest,user,JBossAdmin,Users' - echo "Add quickstartAdmin..." - ${{ inputs.DEPLOYMENT_DIR }}/target/server/bin/add-user.sh -a -u 'quickstartAdmin' -p 'adminPwd1!' -g 'guest,user,admin' + if [ -f inputs.DEPLOYMENT_DIR }}/target/server/bin/add-user.sh ]; then + echo "Add quickstartUser..." + ${{ inputs.DEPLOYMENT_DIR }}/target/server/bin/add-user.sh -a -u 'quickstartUser' -p 'quickstartPwd1!' -g 'guest,user,JBossAdmin,Users' + echo "Add quickstartAdmin..." + ${{ inputs.DEPLOYMENT_DIR }}/target/server/bin/add-user.sh -a -u 'quickstartAdmin' -p 'adminPwd1!' -g 'guest,user,admin' + fi echo "Starting provisioned server..." mvn -f ${{ inputs.DEPLOYMENT_DIR }}/pom.xml wildfly:start -DjbossHome=${{ inputs.DEPLOYMENT_DIR }}/target/server -Dstartup-timeout=120 echo "Testing provisioned server..." @@ -207,10 +209,12 @@ jobs: cd ${{ inputs.QUICKSTART_PATH }} echo "Building provisioned server..." mvn -fae clean package -Pprovisioned-server -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }} - echo "Add quickstartUser..." - ${{ inputs.DEPLOYMENT_DIR }}/target/server/bin/add-user.sh -a -u 'quickstartUser' -p 'quickstartPwd1!' -g 'guest,user,JBossAdmin,Users' - echo "Add quickstartAdmin..." - ${{ inputs.DEPLOYMENT_DIR }}/target/server/bin/add-user.sh -a -u 'quickstartAdmin' -p 'adminPwd1!' -g 'guest,user,admin' + if [ -f inputs.DEPLOYMENT_DIR }}/target/server/bin/add-user.sh ]; then + echo "Add quickstartUser..." + ${{ inputs.DEPLOYMENT_DIR }}/target/server/bin/add-user.sh -a -u 'quickstartUser' -p 'quickstartPwd1!' -g 'guest,user,JBossAdmin,Users' + echo "Add quickstartAdmin..." + ${{ inputs.DEPLOYMENT_DIR }}/target/server/bin/add-user.sh -a -u 'quickstartAdmin' -p 'adminPwd1!' -g 'guest,user,admin' + fi echo "Starting provisioned server..." mvn -f ${{ inputs.DEPLOYMENT_DIR }}/pom.xml wildfly:start -DjbossHome=${{ inputs.DEPLOYMENT_DIR }}/target/server -Dstartup-timeout=120 echo "Testing provisioned server..."