|
|
@@ -0,0 +1,36 @@
|
|
|
+pipeline {
|
|
|
+ agent any
|
|
|
+ environment {
|
|
|
+ DOTNET_CLI_TELEMETRY_OPTOUT = '1'
|
|
|
+ DEPLOY_API = '/mnt/h/iis/bitforum-api'
|
|
|
+ DEPLOY_ADMIN = '/mnt/h/iis/bitforum-admin'
|
|
|
+ }
|
|
|
+ stages {
|
|
|
+ stage('Build') {
|
|
|
+ steps {
|
|
|
+ sh 'dotnet publish Web.Api -c Release -o publish/api'
|
|
|
+ sh 'dotnet publish Admin -c Release -o publish/admin'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ stage('Deploy API') {
|
|
|
+ steps {
|
|
|
+ sh 'rsync -av --delete --exclude="web.config" --exclude="restart.ps1" publish/api/ ${DEPLOY_API}/'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ stage('Deploy Admin') {
|
|
|
+ steps {
|
|
|
+ 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 {
|
|
|
+ success { echo 'Backend 배포 성공!' }
|
|
|
+ failure { echo 'Backend 배포 실패 - 로그를 확인하세요.' }
|
|
|
+ }
|
|
|
+}
|