From c4ac79ef8ba6270876624e7ed0c7f9c8415130de Mon Sep 17 00:00:00 2001 From: soufiane Date: Fri, 28 Nov 2025 09:38:57 +0100 Subject: [PATCH] feat: add email notifications to CI/CD pipeline MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Send success/failure notifications to soufiane.baali99@gmail.com - Include build details: project, build number, environment, duration - HTML formatted emails with links to build logs πŸ€– Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- Jenkinsfile | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 3570691..81e27f2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -294,6 +294,22 @@ pipeline { β•‘ Tag : ${env.TAG.padRight(23)} β•‘ β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β• """ + emailext( + to: 'soufiane.baali99@gmail.com', + subject: "βœ… Pipeline Frontend SUCCÈS - ${env.ENV}", + body: """ +

βœ… Pipeline Frontend terminΓ© avec succΓ¨s

+ + + + + + +
Projet${env.JOB_NAME}
Build#${env.BUILD_NUMBER}
Environnement${env.ENV}
Image${IMAGE_NAME}:${env.TAG}
DurΓ©e${currentBuild.durationString}
+

πŸ”— Voir les dΓ©tails du build

+ """, + mimeType: 'text/html' + ) } failure { echo """ @@ -304,6 +320,22 @@ pipeline { β•‘ VΓ©rifiez les logs pour plus de dΓ©tails β•‘ β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β• """ + emailext( + to: 'soufiane.baali99@gmail.com', + subject: "❌ Pipeline Frontend Γ‰CHEC - ${env.ENV}", + body: """ +

❌ Pipeline Frontend a échoué

+ + + + + +
Projet${env.JOB_NAME}
Build#${env.BUILD_NUMBER}
Environnement${env.ENV}
DurΓ©e${currentBuild.durationString}
+

πŸ”— Voir les logs du build

+

πŸ”— Console Output

+ """, + mimeType: 'text/html' + ) } } }