From 9bf0cc8df273367eda8a9ddee08252f0945cad37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B6=8C=ED=98=81=EC=84=B1?= Date: Fri, 27 Feb 2026 10:44:54 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20[cicd]=20=EB=B0=B0=ED=8F=AC=20=EC=8A=B9?= =?UTF-8?q?=EC=9D=B8=20=EB=B9=84=ED=99=9C=EC=84=B1=ED=99=94=20+=20storage?= =?UTF-8?q?=20=EA=B6=8C=ED=95=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Production Approval stage 주석처리 (런칭 후 활성화) - 배포 시 storage/bootstrap chown www-data:webservice + chmod 775 추가 - Stage/Production 모두 적용 --- Jenkinsfile | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index c0c7b43..f76fef7 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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 &&