|
@@ -2,39 +2,35 @@ pipeline {
|
|
|
agent any
|
|
agent any
|
|
|
environment {
|
|
environment {
|
|
|
DOTNET_CLI_TELEMETRY_OPTOUT = '1'
|
|
DOTNET_CLI_TELEMETRY_OPTOUT = '1'
|
|
|
- DEPLOY_API = 'H:\\IIS\\bitforum-api'
|
|
|
|
|
- DEPLOY_ADMIN = 'H:\\IIS\\bitforum-admin'
|
|
|
|
|
|
|
+ DEPLOY_API = '/mnt/h/iis/bitforum-api'
|
|
|
|
|
+ DEPLOY_ADMIN = '/mnt/h/iis/bitforum-admin'
|
|
|
}
|
|
}
|
|
|
stages {
|
|
stages {
|
|
|
- stage('Backend Build') {
|
|
|
|
|
|
|
+ stage('Build') {
|
|
|
steps {
|
|
steps {
|
|
|
- bat 'dotnet publish Backend\\Web.Api -c Release -o publish\\api'
|
|
|
|
|
- bat 'dotnet publish Backend\\Admin -c Release -o publish\\admin'
|
|
|
|
|
|
|
+ sh 'dotnet publish Backend/Web.Api -c Release -o publish/api'
|
|
|
|
|
+ sh 'dotnet publish Backend/Admin -c Release -o publish/admin'
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
stage('Deploy API') {
|
|
stage('Deploy API') {
|
|
|
steps {
|
|
steps {
|
|
|
- bat 'powershell.exe -ExecutionPolicy Bypass -File %DEPLOY_API%\\restart.ps1 stop'
|
|
|
|
|
- bat 'timeout /t 3 /nobreak'
|
|
|
|
|
- bat 'robocopy publish\\api %DEPLOY_API% /E /PURGE /XF web.config restart.ps1 || if %ERRORLEVEL% LEQ 7 exit 0'
|
|
|
|
|
- bat 'powershell.exe -ExecutionPolicy Bypass -File %DEPLOY_API%\\restart.ps1 start'
|
|
|
|
|
|
|
+ sh 'rsync -av --delete --exclude="web.config" --exclude="restart.ps1" publish/api/ ${DEPLOY_API}/'
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
stage('Deploy Admin') {
|
|
stage('Deploy Admin') {
|
|
|
steps {
|
|
steps {
|
|
|
- bat 'powershell.exe -ExecutionPolicy Bypass -File %DEPLOY_ADMIN%\\restart.ps1 stop'
|
|
|
|
|
- bat 'timeout /t 3 /nobreak'
|
|
|
|
|
- bat 'robocopy publish\\admin %DEPLOY_ADMIN% /E /PURGE /XF web.config restart.ps1 || if %ERRORLEVEL% LEQ 7 exit 0'
|
|
|
|
|
- bat 'powershell.exe -ExecutionPolicy Bypass -File %DEPLOY_ADMIN%\\restart.ps1 start'
|
|
|
|
|
|
|
+ sh 'rsync -av --delete --exclude="web.config" --exclude="restart.ps1" publish/admin/ ${DEPLOY_ADMIN}/'
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ stage('Restart Services') {
|
|
|
|
|
+ steps {
|
|
|
|
|
+ sh 'powershell.exe -ExecutionPolicy Bypass -File /mnt/h/iis/bitforum-api/restart.ps1'
|
|
|
|
|
+ sh 'powershell.exe -ExecutionPolicy Bypass -File /mnt/h/iis/bitforum-admin/restart.ps1'
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
post {
|
|
post {
|
|
|
- success {
|
|
|
|
|
- echo 'bitForum-backend 배포 성공!'
|
|
|
|
|
- }
|
|
|
|
|
- failure {
|
|
|
|
|
- echo 'bitforum-backend 배포 실패 - 기록을 확인하세요.'
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ success { echo 'Backend 배포 성공!' }
|
|
|
|
|
+ failure { echo 'Backend 배포 실패 - 로그를 확인하세요.' }
|
|
|
}
|
|
}
|
|
|
-}
|
|
|
|
|
|
|
+}
|