Skip to content
Switch branches/tags
Go to file
Cannot retrieve contributors at this time
executable file 40 lines (36 sloc) 1.56 KB
# A script to build a fresh EAR, blow away the old database
# contents and build a new schema, and deploy the EAR.
# For use in development when testing a pull request.
# If you don't want to have to type in the psm user's
# PostgreSQL password midway through, create a .pgpass file
# in your home directory:
RESPONSE=$(${WILDFLY_CLI} --connect --command=":read-attribute(name=server-state)")
# Check whether WildFly is running.
# TODO: use something like
# to check whether WildFly is about to run out of memory.
if echo $RESPONSE | grep "Failed"
echo "Please start WildFly in another terminal first:"
echo "wildfly-11.0.0.Final/bin/ -c standalone-full.xml"
set -e
cd ../psm-app
./gradlew clean cms-portal-services:build
cd ..
echo "Re-seeding database"
cat scripts/drop-contents-of-db-for-testing.sql \
psm-app/db/jbpm.sql \
psm-app/db/seed.sql | psql -h localhost -U psm psm
# Once we have a new dev enrollment schema:
# psql -h localhost -U psm psm < psm-app/db/dev_enrollment.sql
echo "Deploying new EAR"
${WILDFLY_CLI} --connect \
--command="deploy --force
echo "Ready to test at http://localhost:8080/cms/ ."
echo "To stop WildFly server: ${WILDFLY_CLI} --connect --command=:shutdown "