ci: Jenkinsfile slackSend 알림 복구
- Checkout: slackSend 빌드 시작 알림 추가 (tokenCredentialId) - Post success/failure: echo → slackSend 교체 (tokenCredentialId) - 이전 rebase 과정에서 소실된 slackSend 복구 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
14
Jenkinsfile
vendored
14
Jenkinsfile
vendored
@@ -8,7 +8,11 @@ pipeline {
|
||||
|
||||
stages {
|
||||
stage('Checkout') {
|
||||
steps { checkout scm }
|
||||
steps {
|
||||
slackSend channel: '#product_infra', color: '#439FE0', tokenCredentialId: 'slack-token',
|
||||
message: "🚀 *api* 빌드 시작 (`${env.BRANCH_NAME}`)\n<${env.BUILD_URL}|빌드 #${env.BUILD_NUMBER}>"
|
||||
checkout scm
|
||||
}
|
||||
}
|
||||
|
||||
// ── main → 운영서버 Stage 배포 ──
|
||||
@@ -99,9 +103,13 @@ pipeline {
|
||||
}
|
||||
|
||||
post {
|
||||
success { echo "✅ api 배포 완료 (${env.BRANCH_NAME})" }
|
||||
success {
|
||||
slackSend channel: '#product_infra', color: 'good', tokenCredentialId: 'slack-token',
|
||||
message: "✅ *api* 배포 성공 (`${env.BRANCH_NAME}`)\n<${env.BUILD_URL}|빌드 #${env.BUILD_NUMBER}>"
|
||||
}
|
||||
failure {
|
||||
echo "❌ api 배포 실패 (${env.BRANCH_NAME})"
|
||||
slackSend channel: '#product_infra', color: 'danger', tokenCredentialId: 'slack-token',
|
||||
message: "❌ *api* 배포 실패 (`${env.BRANCH_NAME}`)\n<${env.BUILD_URL}|빌드 #${env.BUILD_NUMBER}>"
|
||||
script {
|
||||
if (env.BRANCH_NAME == 'main') {
|
||||
sshagent(credentials: ['deploy-ssh-key']) {
|
||||
|
||||
Reference in New Issue
Block a user