fix: [cicd] 배포 승인 비활성화 + storage 권한 수정
- Production Approval stage 주석처리 (런칭 후 활성화) - 배포 시 storage/bootstrap chown www-data:webservice + chmod 775 추가 - Stage/Production 모두 적용
This commit is contained in:
28
Jenkinsfile
vendored
28
Jenkinsfile
vendored
@@ -37,6 +37,8 @@ pipeline {
|
|||||||
ssh ${DEPLOY_USER}@211.117.60.189 '
|
ssh ${DEPLOY_USER}@211.117.60.189 '
|
||||||
cd /home/webservice/api-stage/releases/${RELEASE_ID} &&
|
cd /home/webservice/api-stage/releases/${RELEASE_ID} &&
|
||||||
mkdir -p bootstrap/cache storage/framework/{views,cache/data,sessions} storage/logs &&
|
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/.env .env &&
|
||||||
ln -sfn /home/webservice/api-stage/shared/storage/app storage/app &&
|
ln -sfn /home/webservice/api-stage/shared/storage/app storage/app &&
|
||||||
composer install --no-dev --optimize-autoloader --no-interaction &&
|
composer install --no-dev --optimize-autoloader --no-interaction &&
|
||||||
@@ -53,18 +55,18 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ── 운영 배포 승인 ──
|
// ── 운영 배포 승인 (런칭 후 활성화) ──
|
||||||
stage('Production Approval') {
|
// stage('Production Approval') {
|
||||||
when { branch 'main' }
|
// when { branch 'main' }
|
||||||
steps {
|
// steps {
|
||||||
slackSend channel: '#product_deploy', color: '#FF9800', tokenCredentialId: 'slack-token',
|
// 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|승인하러 가기>"
|
// 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') {
|
// timeout(time: 24, unit: 'HOURS') {
|
||||||
input message: 'Stage 확인 후 운영 배포를 진행하시겠습니까?\nStage API: https://stage-api.sam.it.kr',
|
// input message: 'Stage 확인 후 운영 배포를 진행하시겠습니까?\nStage API: https://stage-api.sam.it.kr',
|
||||||
ok: '운영 배포 진행'
|
// ok: '운영 배포 진행'
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
// ── main → 운영서버 Production 배포 ──
|
// ── main → 운영서버 Production 배포 ──
|
||||||
stage('Deploy Production') {
|
stage('Deploy Production') {
|
||||||
@@ -81,6 +83,8 @@ pipeline {
|
|||||||
ssh ${DEPLOY_USER}@211.117.60.189 '
|
ssh ${DEPLOY_USER}@211.117.60.189 '
|
||||||
cd /home/webservice/api/releases/${RELEASE_ID} &&
|
cd /home/webservice/api/releases/${RELEASE_ID} &&
|
||||||
mkdir -p bootstrap/cache storage/framework/{views,cache/data,sessions} storage/logs &&
|
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/.env .env &&
|
||||||
ln -sfn /home/webservice/api/shared/storage/app storage/app &&
|
ln -sfn /home/webservice/api/shared/storage/app storage/app &&
|
||||||
composer install --no-dev --optimize-autoloader --no-interaction &&
|
composer install --no-dev --optimize-autoloader --no-interaction &&
|
||||||
|
|||||||
Reference in New Issue
Block a user