From 81b810d598579454552475c21a47f9b910d8343c Mon Sep 17 00:00:00 2001 From: lenape Date: Sun, 3 Aug 2025 01:38:20 +0000 Subject: [PATCH] automated terminal push --- infrastructure/foundation/Jenkinsfile | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/infrastructure/foundation/Jenkinsfile b/infrastructure/foundation/Jenkinsfile index 01744a8..6e1081e 100644 --- a/infrastructure/foundation/Jenkinsfile +++ b/infrastructure/foundation/Jenkinsfile @@ -437,7 +437,7 @@ common_tags = { ManagedBy = "jenkins" Pipeline = "foundation-layer" BuildNumber = "${BUILD_NUMBER}" - GitCommit = "${env.GIT_COMMIT ?: 'unknown'}" + GitCommit = "${GIT_COMMIT:-unknown}" } EOF fi @@ -776,7 +776,7 @@ Type 'DESTROY' exactly to confirm: // Archive all important artifacts dir("${env.TF_WORKING_DIR}") { - archiveArtifacts artifacts: '*.tf,terraform.tfvars,*.tfplan,terraform-outputs.*,sonar-project.properties,.backend-config', allowEmptyArchive: true + archiveArtifacts artifacts: '*.tf,terraform.tfvars,*.tfplan,terraform-outputs.*,sonar-project.properties,backend.tf', allowEmptyArchive: true } } } @@ -784,12 +784,9 @@ Type 'DESTROY' exactly to confirm: success { script { echo "✅ Foundation Layer pipeline completed successfully!" - + if (params.ACTION == 'apply') { - // Compute approver line outside the multi-line string - def approverLine = env.DEPLOYMENT_APPROVER ? "• Approved by: ${env.DEPLOYMENT_APPROVER}" : "" - - def message = """ + echo """ 🎉 Foundation Layer Deployment Complete! 📊 Deployment Details: @@ -797,9 +794,13 @@ Type 'DESTROY' exactly to confirm: - Region: ${params.AWS_REGION} - Project: ${params.PROJECT_NAME} - Build: #${BUILD_NUMBER} -- Duration: ${currentBuild.durationString}${approverLine ? '\n' + approverLine: ''} - - +- Duration: ${currentBuild.durationString}""" + + if (env.DEPLOYMENT_APPROVER) { + echo "- Approved by: ${env.DEPLOYMENT_APPROVER}" + } + + echo """ 🏗️ Infrastructure Created: • VPC with multi-AZ public subnets • Security groups for ALB and ECS @@ -807,16 +808,14 @@ Type 'DESTROY' exactly to confirm: • DynamoDB table for state locking • Internet Gateway and routing -💰 Cost: ~$0/month (free tier optimized) +💰 Cost: ~\$0/month (free tier optimized) 🚀 Next Steps: • Phase 2: Deploy Shared Services (ECR, ALB, IAM) • Phase 3: Deploy Application Layer (ECS Fargate) • Phase 4: Setup application CI/CD pipeline -📋 Outputs: Check archived artifacts for resource details - """ - echo message +📋 Outputs: Check archived artifacts for resource details""" } } }