Forked from ivan-pinatti/jenkins-set-system-message.groovy
Created
April 19, 2021 03:54
-
-
Save john24rel/c46eaf3b524a85855f8f6ed69cc083ec to your computer and use it in GitHub Desktop.
Jenkins - Set Jenkins system message via groovy script - #jenkins #groovy #system #message
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
#!groovy | |
// imports | |
import jenkins.model.Jenkins | |
// parameters | |
def systemMessage = "Insert your Jenkins system message here." | |
// get Jenkins instance | |
Jenkins jenkins = Jenkins.getInstance() | |
// set Jenkins system message | |
jenkins.setSystemMessage(systemMessage) | |
// save current Jenkins state to disk | |
jenkins.save() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment