From 85b2f01ce0392cb962211266e19a41e4a3fbff55 Mon Sep 17 00:00:00 2001 From: rinjae Date: Thu, 18 Jun 2026 13:43:24 +0900 Subject: [PATCH] =?UTF-8?q?Jenkinsfile.deploy=20=EC=97=85=EB=8D=B0?= =?UTF-8?q?=EC=9D=B4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jenkinsfile.deploy | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/Jenkinsfile.deploy b/Jenkinsfile.deploy index aece0d6..c4a6a87 100644 --- a/Jenkinsfile.deploy +++ b/Jenkinsfile.deploy @@ -19,6 +19,7 @@ pipeline { CATALINA_HOME = '/prod/eapim/apache-tomcat-9.0.116' CATALINA_PID = '/prod/eapim/devportal/temp/catalina.pid' DEPLOY_HTTP_PORT = '39130' + WEBHOOK_URL = 'http://172.30.1.50:18000/api/hooks/01ba51b01d3c4c98ae8f3183a23a84ed713197857d024b5da4f303458195eb32' } stages { @@ -186,4 +187,31 @@ pipeline { } } + post { + success { + sh ''' + set +e + payload=$(printf '{"job":"%s","build":%s,"result":"%s","url":"%s"}' \ + "$JOB_NAME" "$BUILD_NUMBER" "SUCCESS" "$BUILD_URL") + curl -sS --fail --max-time 5 \ + -H 'Content-Type: application/json' \ + -X POST \ + --data "$payload" \ + "$WEBHOOK_URL" >/dev/null || echo "Webhook delivery failed for SUCCESS" + ''' + } + failure { + sh ''' + set +e + payload=$(printf '{"job":"%s","build":%s,"result":"%s","url":"%s"}' \ + "$JOB_NAME" "$BUILD_NUMBER" "FAILURE" "$BUILD_URL") + curl -sS --fail --max-time 5 \ + -H 'Content-Type: application/json' \ + -X POST \ + --data "$payload" \ + "$WEBHOOK_URL" >/dev/null || echo "Webhook delivery failed for FAILURE" + ''' + } + } + }