automated terminal push
This commit is contained in:
9
Jenkinsfile
vendored
9
Jenkinsfile
vendored
@@ -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"
|
||||
|
Reference in New Issue
Block a user