automated terminal push
This commit is contained in:
27
infrastructure/foundation/Jenkinsfile
vendored
27
infrastructure/foundation/Jenkinsfile
vendored
@@ -437,7 +437,7 @@ common_tags = {
|
|||||||
ManagedBy = "jenkins"
|
ManagedBy = "jenkins"
|
||||||
Pipeline = "foundation-layer"
|
Pipeline = "foundation-layer"
|
||||||
BuildNumber = "${BUILD_NUMBER}"
|
BuildNumber = "${BUILD_NUMBER}"
|
||||||
GitCommit = "${env.GIT_COMMIT ?: 'unknown'}"
|
GitCommit = "${GIT_COMMIT:-unknown}"
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
@@ -776,7 +776,7 @@ Type 'DESTROY' exactly to confirm:
|
|||||||
|
|
||||||
// Archive all important artifacts
|
// Archive all important artifacts
|
||||||
dir("${env.TF_WORKING_DIR}") {
|
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 {
|
success {
|
||||||
script {
|
script {
|
||||||
echo "✅ Foundation Layer pipeline completed successfully!"
|
echo "✅ Foundation Layer pipeline completed successfully!"
|
||||||
|
|
||||||
if (params.ACTION == 'apply') {
|
if (params.ACTION == 'apply') {
|
||||||
// Compute approver line outside the multi-line string
|
echo """
|
||||||
def approverLine = env.DEPLOYMENT_APPROVER ? "• Approved by: ${env.DEPLOYMENT_APPROVER}" : ""
|
|
||||||
|
|
||||||
def message = """
|
|
||||||
🎉 Foundation Layer Deployment Complete!
|
🎉 Foundation Layer Deployment Complete!
|
||||||
|
|
||||||
📊 Deployment Details:
|
📊 Deployment Details:
|
||||||
@@ -797,9 +794,13 @@ Type 'DESTROY' exactly to confirm:
|
|||||||
- Region: ${params.AWS_REGION}
|
- Region: ${params.AWS_REGION}
|
||||||
- Project: ${params.PROJECT_NAME}
|
- Project: ${params.PROJECT_NAME}
|
||||||
- Build: #${BUILD_NUMBER}
|
- 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:
|
🏗️ Infrastructure Created:
|
||||||
• VPC with multi-AZ public subnets
|
• VPC with multi-AZ public subnets
|
||||||
• Security groups for ALB and ECS
|
• Security groups for ALB and ECS
|
||||||
@@ -807,16 +808,14 @@ Type 'DESTROY' exactly to confirm:
|
|||||||
• DynamoDB table for state locking
|
• DynamoDB table for state locking
|
||||||
• Internet Gateway and routing
|
• Internet Gateway and routing
|
||||||
|
|
||||||
💰 Cost: ~$0/month (free tier optimized)
|
💰 Cost: ~\$0/month (free tier optimized)
|
||||||
|
|
||||||
🚀 Next Steps:
|
🚀 Next Steps:
|
||||||
• Phase 2: Deploy Shared Services (ECR, ALB, IAM)
|
• Phase 2: Deploy Shared Services (ECR, ALB, IAM)
|
||||||
• Phase 3: Deploy Application Layer (ECS Fargate)
|
• Phase 3: Deploy Application Layer (ECS Fargate)
|
||||||
• Phase 4: Setup application CI/CD pipeline
|
• Phase 4: Setup application CI/CD pipeline
|
||||||
|
|
||||||
📋 Outputs: Check archived artifacts for resource details
|
📋 Outputs: Check archived artifacts for resource details"""
|
||||||
"""
|
|
||||||
echo message
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user