From 4b834528680eb159809801f497b4150eb493e569 Mon Sep 17 00:00:00 2001 From: Bendy Zhang Date: Sun, 24 Jun 2018 22:52:32 +0800 Subject: [PATCH] ci: remove old app folder --- Jenkinsfile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 165f2c8e..9f71ca0e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -6,7 +6,8 @@ pipeline { } environment { - DEPLOY_TARGET = '../../../../websites/demo/wf.war' + APP_NAME = 'wf' + DEPLOY_TO = '../../../../websites/demo/' EMAIL_RECIPIENTS = 'zb@bndy.net' HAS_DEPLOYMENT = 'false' } @@ -39,8 +40,9 @@ pipeline { } steps { echo 'Deploying....' - sh 'rm -f $DEPLOY_TARGET' - sh 'mv ./target/wf-*.war $DEPLOY_TARGET' + sh 'rm -f ${DEPLOY_TO}/${APP_NAME}.war' + sh 'rm -Rf $DEPLOY_TO' + sh 'mv ./target/wf-*.war ${DEPLOY_TO}/${APP_NAME}.war' script { HAS_DEPLOYMENT = 'true' }