Skip to content

Commit

Permalink
Corretto script di install e aggiunte echo informative
Browse files Browse the repository at this point in the history
  • Loading branch information
nardil committed Sep 2, 2019
1 parent d1e0404 commit 7059e02
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/main/resources/scripts/jenkins.cleanup.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
echo "Shutdown wildfly..."
sudo systemctl stop wildfly@govpay
echo "Rimozione dati del simulatore pagoPA..."
sudo rm -rf /var/govpay-ndpsym/cache/*.cache
sudo rm -rf /var/govpay-ndpsym/cache/RH/*
psql ndpsym ndpsym -c "delete from rpt;"
psql ndpsym ndpsym -c "delete from wisp;"
echo "Rimozione database e deploy di govpay..."
sudo -u postgres dropdb --if-exists govpay
sudo rm /opt/wildfly-11.0.0.Final/standalone_govpay/deployments/govpay.ear
8 changes: 7 additions & 1 deletion src/main/resources/scripts/jenkins.install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ export JAVA_HOME=/opt/jdk1.8.0_191/
## ESECUZIONE INSTALLER
#####

echo "Esecuzione dell'installer..."

pushd src/main/resources/setup/
dirname=$(ls -d target/*/)
cd $dirname

Expand Down Expand Up @@ -41,6 +44,7 @@ sh install.sh text-auto
## SETUP DB
#####

echo "Creazione del database..."
sudo -u postgres dropdb --if-exists govpay
sudo -u postgres createdb govpay -O govpay
psql govpay govpay < dist/sql/gov_pay.sql
Expand All @@ -49,6 +53,8 @@ psql govpay govpay < dist/sql/gov_pay.sql
## SETUP API SECURITY SETTINGS
#####

echo "Abilitazione delle modalita di autenticazione header e basic..."

GOVPAY_WORK_DIR="govpay_ear_tmp"
GOVPAY_SRC_DIR="dist/archivi/"
GOVPAY_EAR_NAME="govpay.ear"
Expand Down Expand Up @@ -116,7 +122,7 @@ mv $GOVPAY_TMP_DIR/$GOVPAY_EAR_NAME .
rm -rf $GOVPAY_TMP_DIR
popd

echo "Deploy govpay";
echo "Deploy govpay in wildfly...";
sudo cp $GOVPAY_WORK_DIR/$GOVPAY_EAR_NAME /opt/wildfly-11.0.0.Final/standalone_govpay/deployments/

rm -rf $GOVPAY_WORK_DIR

0 comments on commit 7059e02

Please sign in to comment.