summaryrefslogtreecommitdiff
path: root/Jenkinsfile
diff options
context:
space:
mode:
authorGrant Limberg <grant.limberg@zerotier.com>2016-10-25 15:51:30 -0700
committerGrant Limberg <grant.limberg@zerotier.com>2016-10-25 15:51:30 -0700
commitbe543c4039ea13957c2db3653e2d3aa355693c91 (patch)
tree559b3201a9f00a256158f6dc33c03ffc86babfee /Jenkinsfile
parent7e7462b39e0ba35ca9ca9ed4a2f7ac6b08565d3c (diff)
downloadinfinitytier-be543c4039ea13957c2db3653e2d3aa355693c91.tar.gz
infinitytier-be543c4039ea13957c2db3653e2d3aa355693c91.zip
use internal changelog library
Diffstat (limited to 'Jenkinsfile')
-rw-r--r--Jenkinsfile30
1 files changed, 2 insertions, 28 deletions
diff --git a/Jenkinsfile b/Jenkinsfile
index 10e0f321..449457bb 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -1,11 +1,9 @@
#!/usr/bin/env groovy
node('master') {
- checkout scm
- passedBuilds = []
- def changelog = lastSuccessfulBuild(passedBuilds, currentBuild)
+ def changelog = getChangeLog currentBuild
- slackSend "Building ${env.JOB_NAME} #${env.BUILD_NUMBER} \n ${changelog}"
+ slackSend "Building ${env.JOB_NAME} #${env.BUILD_NUMBER} \n Change Log: \n ${changelog}"
}
parallel 'centos7': {
@@ -63,27 +61,3 @@ parallel 'centos7': {
}
slackSend "${env.JOB_NAME} #${env.BUILD_NUMBER} Complete (<${env.BUILD_URL}|Show More...>)"
-
-def lastSuccessfulBuild(passedBuilds, build) {
- if ((build != null) && (build.result != 'SUCCESS')) {
- passedBuilds.add(build)
- lastSuccessfulBuild(passedBuilds, build.getPreviousBuild())
- }
-}
-
-@NonCPS
-def getChangeLog(passedBuilds) {
- def log = ""
- for (int x = 0; x < passedBuilds.size(); x++) {
- def currentBuild = passedBuilds[x];
- def changeLogSets = currentBuild.rawBuild.changeSets
- for (int i = 0; i < changeLogSets.size(); i++) {
- def entries = changeLogSets[i].items
- for (int j = 0; j < entries.length; j++) {
- def entry = entries[j]
- log += "* ${entry.msg} by ${entry.author} \n"
- }
- }
- }
- return log;
-} \ No newline at end of file