NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

stage('Final COMS') {

build_status1=currentBuild.currentResult


switch (Application_Deployment_Env) {

case "CIT-QA" :
sitpromote="Promote this build to SIT/PT/OAT env"
link="<td><a href=`${JOB_URL}/build`>Click_here</a></td>"
sitheader="Build Promotion to SIT Environment"
promoter="Promote it by Approving here as required"

break;
case "CIT-GOLD" :
sitpromote="Promote this build to SIT/PT/OAT env"
link="<td><a href=`${JOB_URL}/build`>Click_here</a></td>"
sitheader="Build Promotion to SIT Environment"
promoter="Promote it by Approving here as required"
break;
case "UAT" :
sitpromote="Promote this build to SIT/PT/OAT env"
link="<td><a href=`${JOB_URL}/build`>Click_here</a></td>"
sitheader="Promotion to ${Application_Deployment_Env} Environment is ${build_status1}"
promoter="Promote it by Approving here as required"
if (build_status1.equals("SUCCESS")){
promoter="Version $BuildVersion promoted to ${Application_Deployment_Env} by ${triggered_by}"
}
break;
case "GOLD-QA" :
sitpromote="Promote this build to SIT/PT/OAT env"
link="<td><a href=`${JOB_URL}/build`>Click_here</a></td>"
sitheader="Promotion to ${Application_Deployment_Env} Environment is ${build_status1}"
promoter="Promote it by Approving here as required"
if (build_status1.equals("SUCCESS")){
promoter="Version $BuildVersion promoted to ${Application_Deployment_Env} by ${triggered_by}"
}
break;
case "PT" :
sitpromote="Promote this build to SIT/PT/OAT env"
link="<td><a href=`${JOB_URL}/build`>Click_here</a></td>"
sitheader="Promotion to ${Application_Deployment_Env} Environment is ${build_status1}"
promoter="Promote it by Approving here as required"
if (build_status1.equals("SUCCESS")){
promoter="Version $BuildVersion promoted to ${Application_Deployment_Env} by ${triggered_by}"
}
break;
case "OAT" :
sitpromote="Promote this build to SIT/PT/OAT env"
link="<td><a href=`${JOB_URL}/build`>Click_here</a></td>"
sitheader="Promotion to ${Application_Deployment_Env} Environment is ${build_status1}"
promoter="Promote it by Approving here as required"
if (build_status1.equals("SUCCESS")){
promoter="Version $BuildVersion promoted to ${Application_Deployment_Env} by ${triggered_by}"
}
break;
}


// Convert HashMap to HTML table
StringBuilder buf = new StringBuilder();
buf.append("<style>" +
"BODY, TABLE, TD, TH, P {" +
"font-family: Verdana" +
"font-size: 10px;" +
"color: black;" +
"}" +
".console {" +
"font-family: Courier New;" +
"}" +
".filesChanged {" +
"width:20%;" +
"padding-left: 10px;" +
"}" +
".section {" +
"width: 100%;" +
"border: thin black dotted;" +
"}" +
".td-title-main {" +
"color: white;" +
"font-size: 200%;" +
"padding-left: 5px;" +
"font-weight: bold;" +
"}" +
".td-title {" +
"color: white;" +
"font-size: 120%;" +
"font-weight: bold;" +
"padding-left: 5px;" +
"}" +
".td-title-tests {" +
"font-weight: bold;" +
"font-size: 120%;" +
"}" +
".td-header-maven-module {" +
"font-weight: bold;" +
"font-size: 120%;" +
"}" +
".td-maven-artifact {" +
"padding-left: 5px;" +
"}" +
".tr-title {" +
"background-color: #ffa500;" +
"}" +
".test {" +
"padding-left: 20px;" +
"}" +
".test-fixed {" +
"color: #27AE60;" +
"}" +
".test-failed {" +
"color: #E74C3C;" +
"}" +
"</style>" +
"<body>" +
"<!-- BUILD RESULT -->" +
"<table class=section border=1>" +
"<tr class=tr-title>" +
"<td align=center class=td-title-main colspan=2>" +
"Build & Deployment - ${build_status1}" +
"</td>" +
"</tr>" +
"<tr>" +
"<th align=left>URL</th>" +
"<td><a href=${BUILD_URL}>${BUILD_URL}</a></td>" +
"</tr>" +
"<tr>" +
"<th align=left>Environment:</td>" +
"<td>${Application_Deployment_Env}</td>" +
"</tr>" +
"<tr>" +
"<th align=left>Branch:</td>" +
"<td>${Branch_Name}</td>" +
"</tr>" +
"<tr>" +
"<th align=left>Build Version:</td>" +
"<td>${BuildVersion}</td>" +
"</tr>" +
"<tr>" +
"<th align=left>Instance_name:</td>" +
"<td>${instance_name}</td>" +
"</tr>" +
"<tr>" +
"<th align=left>Deployment Status:</td>" +
"<td>${build_status1}</td>" +
"</tr>" +
"<tr>" +
"<th align=left>Sanity Report:</td>" +
"<td> NA </td>" +
"</tr>" +
"<tr>" +
"<th align=left>Triggered By:</td>" +
"<td> ${triggered_by} </td>" +
"</tr>" +
"</tr>" +
"<tr>" +
"<th align=left>Artifact Link:</td>" +
"<td>https://artifactory.global.standardchartered.com/artifactory/generic-release/s2bnextgen-release/ui/ui-${build_version}-ui-core-${build_version}.zip</td>" +
"</tr>" +
"</table>" +
"<br>" +

"<!-- CHANGE SET -->" +

"<table class=section border=1>" +
"<tr class=tr-title>" +
"<td class=td-title colspan=2 align=center>${sitheader}</td>" +
"</tr>" +

"<tr><td colspan=2 align=center>$promoter</td></tr>" +

"<tr>" +
"<td class=filesChanged>$sitpromote</td>" +
"$link" +
"</tr>" +

"</table>" +
"<br>" +
"</body>" );

String html = buf.toString()
writeFile file: "emailTemplate.html", text: "$html"
//Email Sanity results with attachment


def mailTo = "${jobUserId};1176298;1361234;1581391;1567685;1560968;1558863;1584998;1162989;1562576;1566343;1380627;1163041;1375285;1305786;1583408;1193721;1191958;1565735;1573700;1271862;1294446;1596375;1509832;1577602;1545416;1600036;1557584;1601688;1411794;1594460;1586336;1569412;1562096;1485662;1486159;1337850;1400528;1449077;1448834;1241605;1509402;1465875;1579536"
def mailSubj = "in Environment ${env.Application_Deployment_Env} -> in branch- ${branchName} #${env.BUILD_NUMBER} [${currentBuild.result}]"
def sanityreport = "NextGenApi/Reports/*"
script {
emailext (
to: "${mailTo}",
body: '''${FILE, path="emailTemplate.html"}''',
mimeType: 'text/html',
subject: "[ NG - UI Deployment ] - Build & Deployment ${mailSubj}"
// attachmentsPattern: "${sanityreport}"
)
}

}
}
}
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.