How to trigger nightly build via blue ocean?

45 views
Skip to first unread message

Zack Snyder

unread,
May 4, 2018, 12:39:36 PM5/4/18
to jenkins...@googlegroups.com
Hi,
 
I want to trigger a nightly build (every mitnight) via blue ocean.
However, it seems to be not possible in the configuration view (only viewable).
How can I add the necessary information to the "Jenkinsfile"?
 
Regards,
Zack

Reinhold Füreder

unread,
May 8, 2018, 6:43:55 AM5/8/18
to jenkins...@googlegroups.com

Hi Zack,

 

I think “cron” trigger according to https://jenkins.io/doc/book/pipeline/syntax/#triggers might be what you are looking for?

 

Please note that the jenkins pipeline documentation is really helpful => just try to use it…

 

HTH Reinhold

 

Zack Snyder

unread,
May 9, 2018, 4:53:59 AM5/9/18
to jenkins...@googlegroups.com, jenkins...@googlegroups.com
Okay, thanks.
However, I tried following:
 
triggers
{
    when { branch 'develop' }
    cron('*/6 * * * *')
}
 
The trigger should only build the develop branch every 6 minutes.
The "when" section is not allowed in this scope. How can I trigger automatica build only for develop branch?
 
 
Gesendet: Dienstag, 08. Mai 2018 um 12:43 Uhr
Von: "Reinhold Füreder" <r.fue...@xortex.com>
An: "jenkins...@googlegroups.com" <jenkins...@googlegroups.com>
Betreff: RE: How to trigger nightly build via blue ocean?
--
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/VI1P190MB0255305A1652CAD13BD8D2D1F79A0%40VI1P190MB0255.EURP190.PROD.OUTLOOK.COM.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages