mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-02-06 19:19:58 +00:00
use internal changelog library
This commit is contained in:
parent
7e7462b39e
commit
be543c4039
30
Jenkinsfile
vendored
30
Jenkinsfile
vendored
@ -1,11 +1,9 @@
|
|||||||
#!/usr/bin/env groovy
|
#!/usr/bin/env groovy
|
||||||
|
|
||||||
node('master') {
|
node('master') {
|
||||||
checkout scm
|
def changelog = getChangeLog currentBuild
|
||||||
passedBuilds = []
|
|
||||||
def changelog = lastSuccessfulBuild(passedBuilds, 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': {
|
parallel 'centos7': {
|
||||||
@ -63,27 +61,3 @@ parallel 'centos7': {
|
|||||||
}
|
}
|
||||||
|
|
||||||
slackSend "${env.JOB_NAME} #${env.BUILD_NUMBER} Complete (<${env.BUILD_URL}|Show More...>)"
|
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;
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user