|
|
@@ -0,0 +1,40 @@
|
|
|
+pipeline {
|
|
|
+ agent any
|
|
|
+ environment {
|
|
|
+ DOTNET_CLI_TELEMETRY_OPTOUT = '1'
|
|
|
+ DEPLOY_API = 'H:\\iis\\bitforum-api'
|
|
|
+ DEPLOY_ADMIN = 'H:\\iis\\bitforum-admin'
|
|
|
+ }
|
|
|
+ stages {
|
|
|
+ stage('Backend Build') {
|
|
|
+ steps {
|
|
|
+ bat 'dotnet publish Backend\\Web.Api -c Release -o publish\\api'
|
|
|
+ bat 'dotnet publish Backend\\Admin -c Release -o publish\\admin'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ stage('Deploy API') {
|
|
|
+ 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'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ stage('Deploy Admin') {
|
|
|
+ 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'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ post {
|
|
|
+ success {
|
|
|
+ echo 'bitForum-backend 배포 성공!'
|
|
|
+ }
|
|
|
+ failure {
|
|
|
+ echo 'bitforum-backend 배포 실패 - 기록을 확인하세요.'
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|