Skip to content

Commit 91e25ac

Browse files
committed
Automatically set description of build to parameters of build
1 parent 7479f4d commit 91e25ac

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

releng/promote-a-build.Jenkinsfile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,25 @@ pipeline {
1717
stages {
1818
stage('Upload') {
1919
steps {
20+
script {
21+
def jobName = "$CDT_REPO/job/$CDT_BRANCH"
22+
def description = "Promoted as $MILESTONE to <a href='https://download.eclipse.org/tools/cdt/$RELEASE_OR_BUILD/$MINOR_VERSION/$MILESTONE'>download.eclipse.org/tools/cdt/$RELEASE_OR_BUILD/$MINOR_VERSION/$MILESTONE</a>"
23+
if (params.DRY_RUN) {
24+
description = "Dry Run: $description"
25+
}
26+
27+
// TODO: Can we get permission from EF IT to use Jenkins.instance.getItemByFullName
28+
// def job = Jenkins.instance.getItemByFullName(jobName)
29+
// def build = job?.getBuildByNumber(buildNumber)
30+
31+
// if (build) {
32+
// build.setDescription(description)
33+
// build.keepLog(true)
34+
// } else {
35+
// echo "Build not found: ${jobName} #${CDT_BUILD_NUMBER}"
36+
// }
37+
currentBuild.description = "$description from <a href='https://ci.eclipse.org/cdt/job/$CDT_REPO/job/$CDT_BRANCH/$CDT_BUILD_NUMBER'>$CDT_REPO/job/$CDT_BRANCH/$CDT_BUILD_NUMBER</a>"
38+
}
2039
sshagent ( ['projects-storage.eclipse.org-bot-ssh']) {
2140
sh './releng/scripts/promote-a-build.sh'
2241
}

0 commit comments

Comments
 (0)