Changes in / [970141d:34e1494]
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Jenkinsfile
r970141d r34e1494 224 224 //Routine responsible of sending the email notification once the build is completed 225 225 //=========================================================================================================== 226 @NonCPS227 def SplitLines(String text) {228 def list = []229 230 text.eachLine {231 list += it232 }233 234 return list235 }236 237 226 def GitLogMessage() { 238 227 if (!Settings || !Settings.GitOldRef || !Settings.GitNewRef) return "\nERROR retrieveing git information!\n" 239 228 240 def oldRef = Settings.GitOldRef 241 def newRef = Settings.GitNewRef 242 243 def revText = sh(returnStdout: true, script: "git rev-list ${oldRef}..${newRef}").trim() 244 def revList = SplitLines( revText ) 245 246 def gitUpdate = "" 247 revList.each { rev -> 248 def type = sh(returnStdout: true, script: "git cat-file -t ${rev}").trim() 249 gitUpdate = gitUpdate + " via ${rev} (${type})" 250 } 251 252 def rev = oldRef 253 def type = sh(returnStdout: true, script: "git cat-file -t ${rev}").trim() 254 gitUpdate = gitUpdate + " from ${rev} (${type})" 255 256 def gitLog = sh(returnStdout: true, script: "git rev-list --format=short ${oldRef}...${newRef}").trim() 257 258 def gitDiff = sh(returnStdout: true, script: "git diff --stat --color ${newRef} ${oldRef}").trim() 259 gitDiff = gitDiff.replace('[32m', '<span style="color: #00AA00;">') 260 gitDiff = gitDiff.replace('[31m', '<span style="color: #AA0000;">') 261 gitDiff = gitDiff.replace('[m', '</span>') 229 sh "${SrcDir}/tools/PrettyGitLogs.sh ${SrcDir} ${BuildDir} ${Settings.GitOldRef} ${Settings.GitNewRef}" 230 231 def gitUpdate = readFile("${BuildDir}/GIT_UPDATE") 232 def gitLog = readFile("${BuildDir}/GIT_LOG") 233 def gitDiff = readFile("${BuildDir}/GIT_DIFF") 262 234 263 235 return """
Note: See TracChangeset
for help on using the changeset viewer.