From 73d27b5c3d1d1653e20547cc5e45ad50a7741f21 Mon Sep 17 00:00:00 2001 From: tdevout <43439141+tdevout@users.noreply.github.com> Date: Mon, 13 Feb 2023 15:16:39 +0000 Subject: [PATCH] Update jenkin --- jenkin | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/jenkin b/jenkin index 72044a6..d6a44fa 100644 --- a/jenkin +++ b/jenkin @@ -89,3 +89,27 @@ pipeline { } } } + + +--- + +pipeline { + agent any + stages { + stage('Test Email Configuration') { + steps { + script { + def to = "recipient@example.com" + def subject = "Test Email from Jenkins" + def body = "This is a test email sent from Jenkins pipeline" + def buildResult = currentBuild.currentResult + if (buildResult == 'SUCCESS') { + emailnotify to: "${to}", subject: "${subject}", body: "${body}", + replyTo: "${params.from}", mimeType: 'text/html' + } + } + } + } + } +} +