From 328b2f94ddfbb2b5b923f8d51fec26c419a86ec6 Mon Sep 17 00:00:00 2001 From: MK13 Date: Sun, 8 May 2022 21:20:36 +0200 Subject: [PATCH] #8 Add Jenkins jobs Fix deployment script --- tools/deploy.sh | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/tools/deploy.sh b/tools/deploy.sh index e345ff3..7e2e6ac 100644 --- a/tools/deploy.sh +++ b/tools/deploy.sh @@ -3,6 +3,8 @@ workspace_loc=$1 echo "$workspace_loc" +pwd + deploy_tmp="deploy_tmp" target_loc="/opt/nbscloud" @@ -18,7 +20,7 @@ echo "$user" deploy_path=$(grep "nbscloud.deploy.path" "$app_props_loc" | cut -d'=' -f2) echo "$deploy_path" -base_dir=$(grep "nbs-cloud.files.baseDir" "files_prop_loc" | cut -d'=' -f2) +base_dir=$(grep "nbs-cloud.files.baseDir" "$files_prop_loc" | cut -d'=' -f2) echo "base_dir" mkdir $deploy_tmp @@ -32,15 +34,16 @@ sed -i "s|DEPLOY_PATH_R|$deploy_path|g" nbscloud.service sed -i "s|BASE_DIR_R|$base_dir|g" nbscloud.service echo "" - -# shellcheck disable=SC2046 -# shellcheck disable=SC2005 -echo $(cat nbscloud.service) +cat nbscloud.service echo "" + cp nbscloud.service $target_loc"/nbscloud.service" echo "Copied service file" -cp $(find "$workspace_loc/web-container/target/" -name "*.war") "$target_loc"/nbscloud.war +war_path=$(find "$workspace_loc/web-container/target/" -name "*.war") +echo "$war_path" + +cp "$war_path" "$target_loc"/nbscloud.war echo "Copied war" echo "Finished deployment"