Skip to content

Commit

Permalink
build(Tomcat): Remove deployment of legacy.war
Browse files Browse the repository at this point in the history
  • Loading branch information
geoffreykwan committed Sep 5, 2024
1 parent 49cd7a1 commit 2c6164c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
18 changes: 0 additions & 18 deletions scripts/afterInstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

export HOME=/home/ubuntu
export BUILD_DIR=$HOME/build-folder
export LEGACY_BUILD_DIR=$HOME/legacy-build-folder
export BUILD_FILES=$HOME/wise-build-files
export CATALINA_HOME=/opt/tomcat

exec &>> $HOME/deploy.log
Expand All @@ -18,23 +16,7 @@ echo "Moving wise.war to $CATALINA_HOME/webapps/ROOT.war"
mv wise.war $CATALINA_HOME/webapps/ROOT.war
chown tomcat:tomcat $CATALINA_HOME/webapps/ROOT.war

echo "Changing to $LEGACY_BUILD_DIR directory"
cd $LEGACY_BUILD_DIR

echo "Copying legacy.war to $LEGACY_BUILD_DIR"
cp $BUILD_FILES/legacy.war $LEGACY_BUILD_DIR

echo "Injecting application-legacy.properties into legacy.war"
zip -g legacy.war WEB-INF/classes/application.properties

echo "Moving legacy.war to $CATALINA_HOME/webapps/legacy.war"
mv legacy.war $CATALINA_HOME/webapps/legacy.war
chown tomcat:tomcat $CATALINA_HOME/webapps/legacy.war

echo "Deleting build folder"
rm -rf $BUILD_DIR

echo "Deleting legacy build folder"
rm -rf $LEGACY_BUILD_DIR

echo "Finishing deployment at $(date)"
5 changes: 0 additions & 5 deletions scripts/beforeInstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

export HOME=/home/ubuntu
export BUILD_DIR=$HOME/build-folder
export LEGACY_BUILD_DIR=$HOME/legacy-build-folder
export BUILD_FILES=$HOME/wise-build-files
export CATALINA_HOME=/opt/tomcat

Expand Down Expand Up @@ -110,16 +109,12 @@ systemctl restart nginx

echo "Creating additional folders for WISE"
mkdir -p $BUILD_DIR/WEB-INF/classes
mkdir -p $LEGACY_BUILD_DIR/WEB-INF/classes
sudo -u ubuntu -g ubuntu mkdir $HOME/backup
sudo -u ubuntu -g tomcat mkdir $HOME/googleTokens

echo "Copying application.properties file to the build folder"
cp $BUILD_FILES/api/$ENV/application.properties $BUILD_DIR/WEB-INF/classes/application.properties

echo "Copying application-legacy.properties file to the legacy build folder"
cp $BUILD_FILES/api/$ENV/application-legacy.properties $LEGACY_BUILD_DIR/WEB-INF/classes/application.properties

echo "Installing network drive package"
apt-get install nfs-common -y

Expand Down

0 comments on commit 2c6164c

Please sign in to comment.