exdev 자동 배포(Jenkins/post-receive) 및 billcare.exdev.co.kr HTTPS 연동
git push main 시 Docker Compose 빌드·배포하고 Caddy로 https://billcare.exdev.co.kr 접속을 지원합니다. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Vendored
+34
@@ -0,0 +1,34 @@
|
||||
pipeline {
|
||||
agent any
|
||||
parameters {
|
||||
choice(name: 'SERVICE_NAME', choices: ['all', 'frontend', 'backend', 'docker-only'], description: '배포 대상')
|
||||
booleanParam(name: 'DEPLOY_APPROVED', defaultValue: true, description: '배포 승인')
|
||||
}
|
||||
stages {
|
||||
stage('Approve') {
|
||||
steps {
|
||||
script {
|
||||
if (!params.DEPLOY_APPROVED) {
|
||||
error('DEPLOY_APPROVED=true 필요')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Deploy') {
|
||||
steps {
|
||||
sh '''
|
||||
set -euo pipefail
|
||||
export PATH="/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:$PATH"
|
||||
echo "=== BillCare Jenkins Build #${BUILD_NUMBER} ==="
|
||||
echo "시각: $(date)"
|
||||
SERVICE_NAME=${SERVICE_NAME} /Volumes/ADATA/git/deploy-billcare.sh
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'tail -40 /Volumes/ADATA/logs/deploy/billcare-deploy.log || true'
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user