Indra, thank you very much. :)

Dick

On Wed, Jan 25, 2017 at 2:00 PM, Indra Gunawan (ingunawa) <
ingun...@cisco.com> wrote:

> 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
>
>
>
> *From: *<jenkinsci-users@googlegroups.com> on behalf of Richard Ginga <
> rgi...@disruptorbeam.com>
> *Reply-To: *"jenkinsci-users@googlegroups.com" <
> jenkinsci-users@googlegroups.com>
> *Date: *Wednesday, January 25, 2017 at 10:55 AM
> *To: *"jenkinsci-users@googlegroups.com" <jenkinsci-users@googlegroups.com
> >
> *Subject: *Re: groovy access to Jenkins description
>
>
>
> more specifically, i want to change the System Message programmatically.
>
>
>
> How can I do this?
>
>
>
> On Wed, Jan 25, 2017 at 8:51 AM, Richard Ginga <rgi...@disruptorbeam.com>
> wrote:
>
>
> I want to publish global information in the Jenkins main description using
> groovy. where is the class/method to do that?
>
>
>
> thank you
>
> --
>
> Dick Ginga
>
> Build Engineer
>
> rgi...@disruptorbeam.com
>
>
>
>
>
>
>
> --
>
> Dick Ginga
>
> Build Engineer
>
> rgi...@disruptorbeam.com
>
>
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jenkinsci-users/CAL3PpaXD3wbyB_EGMWbUo7akqve9T%
> 2BnCFOhCnTJrJu7r5qCXUQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/jenkinsci-users/CAL3PpaXD3wbyB_EGMWbUo7akqve9T%2BnCFOhCnTJrJu7r5qCXUQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> 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+unsubscr...@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
> <https://groups.google.com/d/msgid/jenkinsci-users/7B4E7B94-BC02-411D-833E-7BB91FF4AC80%40cisco.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Dick Ginga
Build Engineer
rgi...@disruptorbeam.com

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAL3PpaVR5rSvZuGU8tAe6qo8M056w%3DxH%3Do4CTNWsYeuKTQEnMw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to