Here you go a snippet of groovy I use to post System Message on Jenkins to post Common Maintenance Windows downtime info:
import hudson.model.*
def sysMessage = Hudson.instance.systemMessage
def newSysMessage = sysMessage ?: ""
…
cmwHeader = ""
if (cmwHeader != "") {
newSysMessage = newSysMessage + cmwHeader
} else {
newSysMessage = newSysMessage - CMW_NOTICE_PATTERN
}
Hudson.instance.setSystemMessage(newSysMessage)
-Indra
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/CAL3PpaXD3wbyB_EGMWbUo7akqve9T%2BnCFOhCnTJrJu7r5qCXUQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAL3PpaXD3wbyB_EGMWbUo7akqve9T%2BnCFOhCnTJrJu7r5qCXUQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/7B4E7B94-BC02-411D-833E-7BB91FF4AC80%40cisco.com.
For more options, visit https://groups.google.com/d/optout.