automated terminal push
This commit is contained in:
10
Jenkinsfile
vendored
10
Jenkinsfile
vendored
@@ -39,6 +39,7 @@ pipeline {
|
||||
TF_VAR_aws_region = "${AWS_REGION}"
|
||||
// Enhanced deployment tracking
|
||||
IMAGE_TAG = "v1.0.${BUILD_NUMBER}"
|
||||
// Initialize deployment type - will be set properly in stages
|
||||
DEPLOYMENT_TYPE = "APPLICATION"
|
||||
// Enterprise settings
|
||||
TF_IN_AUTOMATION = 'true'
|
||||
@@ -318,13 +319,17 @@ pipeline {
|
||||
|
||||
stage('Deploy Infrastructure') {
|
||||
when {
|
||||
anyOf {
|
||||
expression { params.FORCE_INFRASTRUCTURE_DEPLOY == true }
|
||||
expression { env.DEPLOYMENT_TYPE == "INFRASTRUCTURE" }
|
||||
}
|
||||
}
|
||||
steps {
|
||||
withCredentials([[$class: 'AmazonWebServicesCredentialsBinding', credentialsId: env.AWS_CRED_ID]]) {
|
||||
dir('terraform') {
|
||||
script {
|
||||
echo "🔍 DEPLOYMENT: Deployment type is ${env.DEPLOYMENT_TYPE}"
|
||||
echo "🔍 DEPLOYMENT: Force parameter = ${params.FORCE_INFRASTRUCTURE_DEPLOY}"
|
||||
echo "🔍 DEPLOYMENT: Deployment type = ${env.DEPLOYMENT_TYPE}"
|
||||
echo "🚨 SECURITY NOTICE: Infrastructure deployment requested"
|
||||
echo "🏗️ ARCHITECTURE: Deploying ECS Cluster with SSM access (secure, keyless)"
|
||||
echo "🔐 In production: This would require infrastructure-admin role"
|
||||
@@ -366,8 +371,11 @@ pipeline {
|
||||
|
||||
stage('Wait for ECS Agents') {
|
||||
when {
|
||||
anyOf {
|
||||
expression { params.FORCE_INFRASTRUCTURE_DEPLOY == true }
|
||||
expression { env.DEPLOYMENT_TYPE == "INFRASTRUCTURE" }
|
||||
}
|
||||
}
|
||||
steps {
|
||||
withCredentials([[$class: 'AmazonWebServicesCredentialsBinding', credentialsId: env.AWS_CRED_ID]]) {
|
||||
script {
|
||||
|
Reference in New Issue
Block a user