This commit is contained in:
Ionel Andrei Cataon
2026-02-12 15:32:06 +02:00
parent 8b9dde2f8b
commit 00cf4bb992

View File

@@ -6,7 +6,7 @@ pipeline {
steps { steps {
script { script {
echo "Verificăm sintaxa Python..." echo "Verificăm sintaxa Python..."
sh 'docker run --rm python:3.9-slim python -m py_compile project2/quotes.py' sh 'docker run --rm python:3.9-slim python -m py_compile project2/famousquotes.py'
} }
} }
} }
@@ -14,7 +14,7 @@ pipeline {
stage('Build Docker Image') { stage('Build Docker Image') {
steps { steps {
script { script {
sh 'cd project2 && docker build -t quotes-app .' sh 'cd project2 && docker build -t famousquotes-app .'
} }
} }
} }
@@ -36,7 +36,7 @@ pipeline {
def discordUrl = "https://discord.com/api/webhooks/1471492658336891013/T5s6ZKZjJjDMHXc3k3jjZdk6m5EV12bKF1wda9d5I_gZJrsDZQ1m1m078IiLJWK38mqa" def discordUrl = "https://discord.com/api/webhooks/1471492658336891013/T5s6ZKZjJjDMHXc3k3jjZdk6m5EV12bKF1wda9d5I_gZJrsDZQ1m1m078IiLJWK38mqa"
def payload = """ def payload = """
{ {
"content": "❌ **FAILED: Quotes App**\\nEtapa a eșuat la build-ul #${env.BUILD_NUMBER}. Verifica codul Python!" "content": "❌ **FAILED: Famous Quotes App**\\nEtapa a eșuat la build-ul #${env.BUILD_NUMBER}. Verifica codul Python!"
} }
""" """
sh "curl -H 'Content-Type: application/json' -d '${payload}' ${discordUrl}" sh "curl -H 'Content-Type: application/json' -d '${payload}' ${discordUrl}"