Fix Jenkins pipeline syntax error

This commit is contained in:
OhSeongRak 2025-06-17 16:54:34 +09:00
parent 6d628427a6
commit 3549254b8b

View File

@ -44,7 +44,7 @@ spec:
steps { steps {
script { script {
// deploy_env_vars 파일에서 환경변수 로드 // deploy_env_vars 파일에서 환경변수 로드
if (fileExists('deployment/deploy_env_vars')) { if (fileExists('deploy_env_vars')) {
def envVars = readFile('deploy_env_vars').trim() def envVars = readFile('deploy_env_vars').trim()
envVars.split('\n').each { line -> envVars.split('\n').each { line ->
if (line.contains('=')) { if (line.contains('=')) {
@ -65,8 +65,8 @@ spec:
} }
stage('Build & Push Image') { stage('Build & Push Image') {
container('podman') { steps {
steps { container('podman') {
script { script {
sh """ sh """
podman build \\ podman build \\
@ -89,8 +89,8 @@ spec:
} }
stage('Generate & Apply Manifest') { stage('Generate & Apply Manifest') {
container('envsubst') { steps {
steps { container('envsubst') {
sh """ sh """
export namespace=${env.NAMESPACE} export namespace=${env.NAMESPACE}
export smarketing_frontend_image_path=${env.imagePath} export smarketing_frontend_image_path=${env.imagePath}
@ -107,10 +107,8 @@ spec:
cat deployment/${manifest} cat deployment/${manifest}
""" """
} }
}
container('azure-cli') {
container('azure-cli') {
steps {
sh """ sh """
kubectl apply -f deployment/${manifest} kubectl apply -f deployment/${manifest}