1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-24 17:35:35 +02:00

Automatically set description of build to parameters of build

This commit is contained in:
Jonah Graham 2025-06-12 09:27:40 -04:00
parent 7479f4ddcf
commit 91e25ac721

View file

@ -17,6 +17,25 @@ pipeline {
stages {
stage('Upload') {
steps {
script {
def jobName = "$CDT_REPO/job/$CDT_BRANCH"
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>"
if (params.DRY_RUN) {
description = "Dry Run: $description"
}
// TODO: Can we get permission from EF IT to use Jenkins.instance.getItemByFullName
// def job = Jenkins.instance.getItemByFullName(jobName)
// def build = job?.getBuildByNumber(buildNumber)
// if (build) {
// build.setDescription(description)
// build.keepLog(true)
// } else {
// echo "Build not found: ${jobName} #${CDT_BUILD_NUMBER}"
// }
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>"
}
sshagent ( ['projects-storage.eclipse.org-bot-ssh']) {
sh './releng/scripts/promote-a-build.sh'
}