66import groovy.json.JsonSlurperClassic
77
88emailList = ' vitaly.korolev@progress.com, sumanth.ravipati@progress.com, peng.zhou@progress.com, barkha.choithani@progress.com, romain.winieski@progress.com'
9- emailSecList = ' Rangan.Doreswamy@progress.com, Mahalakshmi.Srinivasan@progress.com'
9+ emailSecList = ' Mahalakshmi.Srinivasan@progress.com'
1010gitCredID = ' marklogic-builder-github'
1111JIRA_ID = ' '
1212JIRA_ID_PATTERN = / (?i)(MLE)-\d {3,6}/
@@ -92,7 +92,7 @@ def getReviewState() {
9292 return reviewState
9393}
9494
95- void resultNotification (message ) {
95+ void resultNotification (status ) {
9696 def author, authorEmail, emailList
9797 // add author of a PR to email list if available
9898 if (env. CHANGE_AUTHOR ) {
@@ -107,11 +107,11 @@ void resultNotification(message) {
107107 jira_email_body = " ${ email_body} <br><br><b>Jira URL: </b><br><a href='${ jira_link} '>${ jira_link} </a>"
108108
109109 if (JIRA_ID ) {
110- def comment = [ body : " Jenkins pipeline build result: ${ message } " ]
110+ def comment = [ body : " Jenkins pipeline build result: ${ status } " ]
111111 jiraAddComment site : ' JIRA' , idOrKey : JIRA_ID , failOnError : false , input : comment
112- mail charset : ' UTF-8' , mimeType : ' text/html' , to : " ${ emailList} " , body : " ${ jira_email_body} " , subject : " ${ message } : ${ env.JOB_NAME} #${ env.BUILD_NUMBER} - ${ JIRA_ID} "
112+ mail charset : ' UTF-8' , mimeType : ' text/html' , to : " ${ emailList} " , body : " ${ jira_email_body} " , subject : " 🥷 ${ status } : ${ env.JOB_NAME} #${ env.BUILD_NUMBER} - ${ JIRA_ID} "
113113 } else {
114- mail charset : ' UTF-8' , mimeType : ' text/html' , to : " ${ emailList} " , body : " ${ email_body} " , subject : " ${ message } : ${ env.JOB_NAME} #${ env.BUILD_NUMBER} "
114+ mail charset : ' UTF-8' , mimeType : ' text/html' , to : " ${ emailList} " , body : " ${ email_body} " , subject : " 🥷 ${ status } : ${ env.JOB_NAME} #${ env.BUILD_NUMBER} "
115115 }
116116}
117117
@@ -142,6 +142,9 @@ void runMinikubeCleanup() {
142142 '''
143143}
144144
145+ void runSecurityScan () {
146+ build job : ' securityscans/Blackduck/KubeNinjas/kubernetes-operator' , wait : false , parameters : [ string(name : ' branch' , value : " ${ env.BRANCH_NAME} " ) ]
147+ }
145148pipeline {
146149 agent {
147150 label {
@@ -172,6 +175,12 @@ pipeline {
172175 }
173176 }
174177
178+ stage(' Run-Security-Scan' ) {
179+ steps {
180+ runSecurityScan()
181+ }
182+ }
183+
175184 stage(' Run-tests' ) {
176185 steps {
177186 runTests()
@@ -203,13 +212,16 @@ pipeline {
203212 publishTestResults()
204213 }
205214 success {
206- resultNotification(' BUILD SUCCESS ✅ ' )
215+ resultNotification(' ✅ Success ' )
207216 }
208217 failure {
209- resultNotification(' BUILD ERROR ❌ ' )
218+ resultNotification(' ❌ Failure ' )
210219 }
211220 unstable {
212- resultNotification(' BUILD UNSTABLE 🉑' )
221+ resultNotification(' ⚠️ Unstable' )
222+ }
223+ aborted {
224+ resultNotification(' 🚫 Aborted' )
213225 }
214226 }
215227}
0 commit comments