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 &&