From 172b7e85f6d23173dccdc22063b4ce41c87a151c Mon Sep 17 00:00:00 2001 From: lenape Date: Tue, 15 Jul 2025 06:06:05 +0000 Subject: [PATCH] automated terminal push --- Jenkinsfile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 0235111..cd8225c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -124,6 +124,7 @@ pipeline { // Check force parameter first - this overrides everything if (params.FORCE_INFRASTRUCTURE_DEPLOY) { env.DEPLOYMENT_TYPE = "INFRASTRUCTURE" + currentBuild.displayName = "INFRASTRUCTURE-FORCED-${BUILD_NUMBER}" echo "🚨 FORCED: Infrastructure deployment requested via parameter" echo "✅ Deployment type set to: INFRASTRUCTURE (forced)" } else if (infrastructureFiles == "initial") { @@ -169,6 +170,7 @@ pipeline { echo " • Architecture: SSM-based ECS access (secure, keyless)" echo " • Security Model: Principle of Least Privilege" echo " • Timestamp: ${new Date()}" + echo "🔄 DEPLOYMENT TYPE CONFIRMATION: ${env.DEPLOYMENT_TYPE}" writeFile file: 'deployment-audit.json', text: """{ "build_number": "${BUILD_NUMBER}", @@ -293,12 +295,15 @@ pipeline { """, returnStdout: true ).trim() + + echo "🔍 Service Exists: ${serviceExists}" + echo "🔍 Container Instances: ${instanceCount}" + if (serviceExists == "false" || instanceCount == "0" || instanceCount == "null") { echo "🚨 SECURITY NOTICE: Infrastructure not ready - forcing deployment" - echo " Service Exists: ${serviceExists}" - echo " Container Instances: ${instanceCount}" env.DEPLOYMENT_TYPE = "INFRASTRUCTURE" currentBuild.description = "INFRASTRUCTURE (auto-detected) | ${env.IMAGE_TAG}" + echo "✅ Changed deployment type to: ${env.DEPLOYMENT_TYPE}" } } else { echo "✅ Infrastructure deployment already forced - skipping readiness check"