automated terminal push
This commit is contained in:
14
Jenkinsfile
vendored
14
Jenkinsfile
vendored
@@ -39,6 +39,7 @@ pipeline {
|
|||||||
TF_VAR_aws_region = "${AWS_REGION}"
|
TF_VAR_aws_region = "${AWS_REGION}"
|
||||||
// Enhanced deployment tracking
|
// Enhanced deployment tracking
|
||||||
IMAGE_TAG = "v1.0.${BUILD_NUMBER}"
|
IMAGE_TAG = "v1.0.${BUILD_NUMBER}"
|
||||||
|
// Initialize deployment type - will be set properly in stages
|
||||||
DEPLOYMENT_TYPE = "APPLICATION"
|
DEPLOYMENT_TYPE = "APPLICATION"
|
||||||
// Enterprise settings
|
// Enterprise settings
|
||||||
TF_IN_AUTOMATION = 'true'
|
TF_IN_AUTOMATION = 'true'
|
||||||
@@ -318,13 +319,17 @@ pipeline {
|
|||||||
|
|
||||||
stage('Deploy Infrastructure') {
|
stage('Deploy Infrastructure') {
|
||||||
when {
|
when {
|
||||||
expression { env.DEPLOYMENT_TYPE == "INFRASTRUCTURE" }
|
anyOf {
|
||||||
|
expression { params.FORCE_INFRASTRUCTURE_DEPLOY == true }
|
||||||
|
expression { 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 "🔍 DEPLOYMENT: Force parameter = ${params.FORCE_INFRASTRUCTURE_DEPLOY}"
|
||||||
|
echo "🔍 DEPLOYMENT: Deployment type = ${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"
|
||||||
@@ -366,7 +371,10 @@ pipeline {
|
|||||||
|
|
||||||
stage('Wait for ECS Agents') {
|
stage('Wait for ECS Agents') {
|
||||||
when {
|
when {
|
||||||
expression { env.DEPLOYMENT_TYPE == "INFRASTRUCTURE" }
|
anyOf {
|
||||||
|
expression { params.FORCE_INFRASTRUCTURE_DEPLOY == true }
|
||||||
|
expression { env.DEPLOYMENT_TYPE == "INFRASTRUCTURE" }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
withCredentials([[$class: 'AmazonWebServicesCredentialsBinding', credentialsId: env.AWS_CRED_ID]]) {
|
withCredentials([[$class: 'AmazonWebServicesCredentialsBinding', credentialsId: env.AWS_CRED_ID]]) {
|
||||||
|
Reference in New Issue
Block a user