Created
August 17, 2022 12:34
-
-
Save bbrks/1e29f3c9554d998ac25c06d1030a3439 to your computer and use it in GitHub Desktop.
Jenkins script for each job's build update description with parameters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Jenkins.instance.getAllItems(Job.class).each{ | |
if (it.name == "SyncGateway-Integration") { | |
it.getBuilds().each{ | |
println 'old description: '+it.getDescription() | |
if (it.getEnvironment().get('TIMEOUT') != null) { | |
it.setDescription("timeout: ${SG_COMMIT} - ${BUILD_USER}") | |
} else { | |
it.setDescription("${SG_COMMIT} - ${BUILD_USER}") | |
} | |
println 'new description: '+it.getDescription() | |
} | |
} | |
} | |
return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment