فهرست منبع

Merge branch 'main' of ssh://git.web.or.kr:9981/admin/bitforum-backend

KIM-JINO5 2 ماه پیش
والد
کامیت
ba4c3aa5e3
1فایلهای تغییر یافته به همراه36 افزوده شده و 0 حذف شده
  1. 36 0
      Jenkinsfile

+ 36 - 0
Jenkinsfile

@@ -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 배포 실패 - 로그를 확인하세요.' }
+    }
+}