automated terminal push
This commit is contained in:
10
Jenkinsfile
vendored
10
Jenkinsfile
vendored
@@ -279,7 +279,7 @@ pipeline {
|
|||||||
echo "🔍 SECURITY: Checking if infrastructure is ready for deployment..."
|
echo "🔍 SECURITY: Checking if infrastructure is ready for deployment..."
|
||||||
echo "🔍 Current deployment type: ${env.DEPLOYMENT_TYPE}"
|
echo "🔍 Current deployment type: ${env.DEPLOYMENT_TYPE}"
|
||||||
|
|
||||||
// Only check readiness if not forced
|
// Only check readiness if deployment type is APPLICATION
|
||||||
if (env.DEPLOYMENT_TYPE == "APPLICATION") {
|
if (env.DEPLOYMENT_TYPE == "APPLICATION") {
|
||||||
def serviceExists = sh(
|
def serviceExists = sh(
|
||||||
script: """
|
script: """
|
||||||
@@ -300,6 +300,8 @@ pipeline {
|
|||||||
env.DEPLOYMENT_TYPE = "INFRASTRUCTURE"
|
env.DEPLOYMENT_TYPE = "INFRASTRUCTURE"
|
||||||
currentBuild.description = "INFRASTRUCTURE (auto-detected) | ${env.IMAGE_TAG}"
|
currentBuild.description = "INFRASTRUCTURE (auto-detected) | ${env.IMAGE_TAG}"
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
echo "✅ Infrastructure deployment already forced - skipping readiness check"
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "📋 SECURITY: Infrastructure readiness assessment completed"
|
echo "📋 SECURITY: Infrastructure readiness assessment completed"
|
||||||
@@ -311,15 +313,13 @@ pipeline {
|
|||||||
|
|
||||||
stage('Deploy Infrastructure') {
|
stage('Deploy Infrastructure') {
|
||||||
when {
|
when {
|
||||||
expression {
|
expression { env.DEPLOYMENT_TYPE == "INFRASTRUCTURE" }
|
||||||
echo "🔍 Checking deployment type: ${env.DEPLOYMENT_TYPE}"
|
|
||||||
return env.DEPLOYMENT_TYPE == "INFRASTRUCTURE"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
withCredentials([[$class: 'AmazonWebServicesCredentialsBinding', credentialsId: env.AWS_CRED_ID]]) {
|
withCredentials([[$class: 'AmazonWebServicesCredentialsBinding', credentialsId: env.AWS_CRED_ID]]) {
|
||||||
dir('terraform') {
|
dir('terraform') {
|
||||||
script {
|
script {
|
||||||
|
echo "🔍 DEPLOYMENT: Deployment type is ${env.DEPLOYMENT_TYPE}"
|
||||||
echo "🚨 SECURITY NOTICE: Infrastructure deployment requested"
|
echo "🚨 SECURITY NOTICE: Infrastructure deployment requested"
|
||||||
echo "🏗️ ARCHITECTURE: Deploying ECS Cluster with SSM access (secure, keyless)"
|
echo "🏗️ ARCHITECTURE: Deploying ECS Cluster with SSM access (secure, keyless)"
|
||||||
echo "🔐 In production: This would require infrastructure-admin role"
|
echo "🔐 In production: This would require infrastructure-admin role"
|
||||||
|
Reference in New Issue
Block a user