refactor: Jenkinsfile v2

This commit is contained in:
OhSeongRak 2025-06-18 17:47:36 +09:00
parent 2c1833ebe1
commit dc5d31442b
2 changed files with 34 additions and 34 deletions

View File

@ -35,24 +35,24 @@ podTemplate(
echo "Team ID: ${props.teamid}" echo "Team ID: ${props.teamid}"
} }
// stage("Check Changes") { stage("Check Changes") {
// script { script {
// def changes = sh( def changes = sh(
// script: "git diff --name-only HEAD~1 HEAD", script: "git diff --name-only HEAD~1 HEAD",
// returnStdout: true returnStdout: true
// ).trim() ).trim()
//
// echo "Changed files: ${changes}" echo "Changed files: ${changes}"
//
// if (!changes.contains("smarketing-ai/")) { if (!changes.contains("smarketing-ai/")) {
// echo "No changes in smarketing-ai, skipping build" echo "No changes in smarketing-ai, skipping build"
// currentBuild.result = 'SUCCESS' currentBuild.result = 'SUCCESS'
// error("Stopping pipeline - no changes detected") error("Stopping pipeline - no changes detected")
// } }
//
// echo "Changes detected in smarketing-ai, proceeding with build" echo "Changes detected in smarketing-ai, proceeding with build"
// } }
// } }
stage("Setup AKS") { stage("Setup AKS") {
container('azure-cli') { container('azure-cli') {

View File

@ -43,22 +43,22 @@ podTemplate(
echo "Image Org: ${props.image_org}" echo "Image Org: ${props.image_org}"
} }
// stage("Check Changes") { stage("Check Changes") {
// script { script {
// def changes = sh( def changes = sh(
// script: "git diff --name-only HEAD~1 HEAD", script: "git diff --name-only HEAD~1 HEAD",
// returnStdout: true returnStdout: true
// ).trim() ).trim()
//
// if (!changes.contains("smarketing-java/")) { if (!changes.contains("smarketing-java/")) {
// echo "No changes in smarketing-java, skipping build" echo "No changes in smarketing-java, skipping build"
// currentBuild.result = 'SUCCESS' currentBuild.result = 'SUCCESS'
// error("Stopping pipeline - no changes detected") error("Stopping pipeline - no changes detected")
// } }
//
// echo "Changes detected in smarketing-java, proceeding with build" echo "Changes detected in smarketing-java, proceeding with build"
// } }
// } }
stage("Setup AKS") { stage("Setup AKS") {
container('azure-cli') { container('azure-cli') {