diff --git a/Jenkinsfile b/Jenkinsfile index 5a2dfb8..605b06f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -6,8 +6,8 @@ properties( [$class: 'LogRotator', artifactDaysToKeepStr: '14', artifactNumToKeepStr: '5', daysToKeepStr: '30', numToKeepStr: '60']], pipelineTriggers( [ - pollSCM('H/1 * * * *'), - // cron('@daily'), + pollSCM('H/15 * * * *'), + cron('@daily'), ] ) ] @@ -36,7 +36,7 @@ node { stage('Build') { milestone() - sh 'ng build --prod --aot --progress=false' + sh 'ng build --prod --aot --base-href /' + env.BRANCH_NAME + '/ --progress=false' } stage('Archive') { @@ -47,7 +47,8 @@ node { stage('Deploy') { milestone() echo "Deploying..." - sh 'rm -r /var/www/html/*' - sh 'cp -r dist/. /var/www/html/' + sh 'rm -rf /var/www/html/' + env.BRANCH_NAME + sh 'mkdir /var/www/html/' + env.BRANCH_NAME + sh 'cp -r dist/. /var/www/html/' + env.BRANCH_NAME + '/' } }