fix: [cicd] 배포 승인 비활성화 + storage 권한 수정

- Production Approval stage 주석처리 (런칭 후 활성화)
- 배포 시 storage/bootstrap chown www-data:webservice + chmod 775 추가
- Stage/Production 모두 적용
This commit is contained in:
2026-02-27 10:44:54 +09:00
parent 255fad99e7
commit 9bf0cc8df2

28
Jenkinsfile vendored
View File

@@ -37,6 +37,8 @@ pipeline {
ssh ${DEPLOY_USER}@211.117.60.189 '
cd /home/webservice/api-stage/releases/${RELEASE_ID} &&
mkdir -p bootstrap/cache storage/framework/{views,cache/data,sessions} storage/logs &&
sudo chown -R www-data:webservice storage bootstrap/cache &&
sudo chmod -R 775 storage bootstrap/cache &&
ln -sfn /home/webservice/api-stage/shared/.env .env &&
ln -sfn /home/webservice/api-stage/shared/storage/app storage/app &&
composer install --no-dev --optimize-autoloader --no-interaction &&
@@ -53,18 +55,18 @@ pipeline {
}
}
// ── 운영 배포 승인 ──
stage('Production Approval') {
when { branch 'main' }
steps {
slackSend channel: '#product_deploy', color: '#FF9800', tokenCredentialId: 'slack-token',
message: "🔔 *api* 운영 배포 승인 대기 중\n${env.GIT_COMMIT_MSG}\nStage API: https://stage-api.sam.it.kr\n<${env.BUILD_URL}input|승인하러 가기>"
timeout(time: 24, unit: 'HOURS') {
input message: 'Stage 확인 후 운영 배포를 진행하시겠습니까?\nStage API: https://stage-api.sam.it.kr',
ok: '운영 배포 진행'
}
}
}
// ── 운영 배포 승인 (런칭 후 활성화) ──
// stage('Production Approval') {
// when { branch 'main' }
// steps {
// slackSend channel: '#product_deploy', color: '#FF9800', tokenCredentialId: 'slack-token',
// message: "🔔 *api* 운영 배포 승인 대기 중\n${env.GIT_COMMIT_MSG}\nStage API: https://stage-api.sam.it.kr\n<${env.BUILD_URL}input|승인하러 가기>"
// timeout(time: 24, unit: 'HOURS') {
// input message: 'Stage 확인 후 운영 배포를 진행하시겠습니까?\nStage API: https://stage-api.sam.it.kr',
// ok: '운영 배포 진행'
// }
// }
// }
// ── main → 운영서버 Production 배포 ──
stage('Deploy Production') {
@@ -81,6 +83,8 @@ pipeline {
ssh ${DEPLOY_USER}@211.117.60.189 '
cd /home/webservice/api/releases/${RELEASE_ID} &&
mkdir -p bootstrap/cache storage/framework/{views,cache/data,sessions} storage/logs &&
sudo chown -R www-data:webservice storage bootstrap/cache &&
sudo chmod -R 775 storage bootstrap/cache &&
ln -sfn /home/webservice/api/shared/.env .env &&
ln -sfn /home/webservice/api/shared/storage/app storage/app &&
composer install --no-dev --optimize-autoloader --no-interaction &&