automated terminal push

This commit is contained in:
lenape
2025-08-03 04:11:51 +00:00
parent def64a867d
commit 5b0d882912

View File

@@ -64,7 +64,6 @@ pipeline {
SONAR_PROJECT_VERSION = "${BUILD_NUMBER}" SONAR_PROJECT_VERSION = "${BUILD_NUMBER}"
} }
stages {
stage('🔍 Checkout & Validation') { stage('🔍 Checkout & Validation') {
steps { steps {
echo "=== Enterprise CI/CD Foundation Layer Pipeline ===" echo "=== Enterprise CI/CD Foundation Layer Pipeline ==="
@@ -86,15 +85,16 @@ pipeline {
sh ''' sh '''
echo "Repository structure validation:" echo "Repository structure validation:"
# Check for required directories # Check for required directory
if [ ! -d "${TF_WORKING_DIR}" ]; then if [ ! -d "${TF_WORKING_DIR}" ]; then
echo "❌ Missing foundation directory: ${TF_WORKING_DIR}" echo "❌ Missing foundation directory: ${TF_WORKING_DIR}"
exit 1 exit 1
fi fi
# Check for required files
cd "${TF_WORKING_DIR}" cd "${TF_WORKING_DIR}"
for file in main.tf variables.tf outputs.tf versions.tf bootstrap.sh cleanup.sh; do
# 1⃣ Core Terraform files (always required)
for file in main.tf variables.tf outputs.tf versions.tf; do
if [ ! -f "$file" ]; then if [ ! -f "$file" ]; then
echo "❌ Missing required file: $file" echo "❌ Missing required file: $file"
exit 1 exit 1
@@ -102,6 +102,19 @@ pipeline {
echo "✅ Found: $file" echo "✅ Found: $file"
done done
# 2⃣ Bootstrap & cleanup scripts (only if ACTION≠plan AND SKIP_BOOTSTRAP=false)
if [ "${ACTION}" != "plan" ] && [ "${SKIP_BOOTSTRAP}" != "true" ]; then
for file in bootstrap.sh cleanup.sh; do
if [ ! -f "$file" ]; then
echo "❌ Missing required file: $file"
exit 1
fi
echo "✅ Found: $file"
done
else
echo "✅ Skipping bootstrap/cleanup checks (ACTION=${ACTION}, SKIP_BOOTSTRAP=${SKIP_BOOTSTRAP})"
fi
# Make scripts executable (if they aren't already) # Make scripts executable (if they aren't already)
chmod +x bootstrap.sh cleanup.sh || { chmod +x bootstrap.sh cleanup.sh || {
echo "⚠️ Could not make scripts executable, but continuing..." echo "⚠️ Could not make scripts executable, but continuing..."