automated terminal push

This commit is contained in:
lenape
2025-07-15 06:06:05 +00:00
parent 28640da842
commit 172b7e85f6

9
Jenkinsfile vendored
View File

@@ -124,6 +124,7 @@ pipeline {
// Check force parameter first - this overrides everything // Check force parameter first - this overrides everything
if (params.FORCE_INFRASTRUCTURE_DEPLOY) { if (params.FORCE_INFRASTRUCTURE_DEPLOY) {
env.DEPLOYMENT_TYPE = "INFRASTRUCTURE" env.DEPLOYMENT_TYPE = "INFRASTRUCTURE"
currentBuild.displayName = "INFRASTRUCTURE-FORCED-${BUILD_NUMBER}"
echo "🚨 FORCED: Infrastructure deployment requested via parameter" echo "🚨 FORCED: Infrastructure deployment requested via parameter"
echo "✅ Deployment type set to: INFRASTRUCTURE (forced)" echo "✅ Deployment type set to: INFRASTRUCTURE (forced)"
} else if (infrastructureFiles == "initial") { } else if (infrastructureFiles == "initial") {
@@ -169,6 +170,7 @@ pipeline {
echo " • Architecture: SSM-based ECS access (secure, keyless)" echo " • Architecture: SSM-based ECS access (secure, keyless)"
echo " • Security Model: Principle of Least Privilege" echo " • Security Model: Principle of Least Privilege"
echo " • Timestamp: ${new Date()}" echo " • Timestamp: ${new Date()}"
echo "🔄 DEPLOYMENT TYPE CONFIRMATION: ${env.DEPLOYMENT_TYPE}"
writeFile file: 'deployment-audit.json', text: """{ writeFile file: 'deployment-audit.json', text: """{
"build_number": "${BUILD_NUMBER}", "build_number": "${BUILD_NUMBER}",
@@ -293,12 +295,15 @@ pipeline {
""", """,
returnStdout: true returnStdout: true
).trim() ).trim()
echo "🔍 Service Exists: ${serviceExists}"
echo "🔍 Container Instances: ${instanceCount}"
if (serviceExists == "false" || instanceCount == "0" || instanceCount == "null") { if (serviceExists == "false" || instanceCount == "0" || instanceCount == "null") {
echo "🚨 SECURITY NOTICE: Infrastructure not ready - forcing deployment" echo "🚨 SECURITY NOTICE: Infrastructure not ready - forcing deployment"
echo " Service Exists: ${serviceExists}"
echo " Container Instances: ${instanceCount}"
env.DEPLOYMENT_TYPE = "INFRASTRUCTURE" env.DEPLOYMENT_TYPE = "INFRASTRUCTURE"
currentBuild.description = "INFRASTRUCTURE (auto-detected) | ${env.IMAGE_TAG}" currentBuild.description = "INFRASTRUCTURE (auto-detected) | ${env.IMAGE_TAG}"
echo "✅ Changed deployment type to: ${env.DEPLOYMENT_TYPE}"
} }
} else { } else {
echo "✅ Infrastructure deployment already forced - skipping readiness check" echo "✅ Infrastructure deployment already forced - skipping readiness check"