diff --git a/apps/demo-nginx/Jenkinsfile.rollback b/apps/demo-nginx/Jenkinsfile.rollback index 5205147..6c47af8 100644 --- a/apps/demo-nginx/Jenkinsfile.rollback +++ b/apps/demo-nginx/Jenkinsfile.rollback @@ -94,7 +94,7 @@ pipeline { kubectl get pods -n ${NAMESPACE} -l app=${APP_NAME} echo "" - echo "=== Rollout History ===\" + echo "=== Rollout History ===" kubectl rollout history deployment/${APP_NAME} -n ${NAMESPACE} """ } @@ -143,20 +143,15 @@ pipeline { echo "🔨 Rebuilding image with updated design..." // Create Dockerfile - sh """ - cat > Dockerfile << 'EOF' -FROM nginx:1.25.3-alpine + writeFile file: 'Dockerfile', text: '''FROM nginx:1.25.3-alpine COPY index.html /usr/share/nginx/html/index.html COPY nginx.conf /etc/nginx/nginx.conf EXPOSE 80 CMD ["nginx", "-g", "daemon off;"] -EOF - """ +''' - // Create HTML with rollback marker - sh """ - cat > index.html << EOF - + // Create HTML with proper variable substitution + def htmlContent = """