automated terminal push

This commit is contained in:
lenape
2025-08-03 01:38:20 +00:00
parent 0d7cb51f32
commit 81b810d598

View File

@@ -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
}
}
}
@@ -786,10 +786,7 @@ Type 'DESTROY' exactly to confirm:
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"""
}
}
}