From 9d30b7491c7c465907977daebcb8e2399a7b48fa Mon Sep 17 00:00:00 2001 From: OhSeongRak Date: Tue, 17 Jun 2025 11:04:20 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20Jenkinsfile=20=EB=B3=80=EA=B2=BD=20?= =?UTF-8?q?-=20Check=20Change=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- smarketing-ai/deployment/Jenkinsfile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/smarketing-ai/deployment/Jenkinsfile b/smarketing-ai/deployment/Jenkinsfile index a478c49..ef25948 100644 --- a/smarketing-ai/deployment/Jenkinsfile +++ b/smarketing-ai/deployment/Jenkinsfile @@ -35,6 +35,25 @@ podTemplate( echo "Team ID: ${props.teamid}" } + stage("Check Changes") { + script { + def changes = sh( + script: "git diff --name-only HEAD~1 HEAD", + returnStdout: true + ).trim() + + echo "Changed files: ${changes}" + + if (!changes.contains("smarketing-ai/")) { + echo "No changes in smarketing-ai, skipping build" + currentBuild.result = 'SUCCESS' + return + } + + echo "Changes detected in smarketing-ai, proceeding with build" + } + } + stage("Setup AKS") { container('azure-cli') { withCredentials([azureServicePrincipal('azure-credentials')]) {