Confused by declarative pipeline trigger specifications

15 views
Skip to first unread message

David Aldrich

unread,
Sep 25, 2019, 4:16:26 AM9/25/19
to jenkins...@googlegroups.com
Hi

We use declarative pipelines extensively, triggered by SCM change. We use a cron spec to specify a SCM polling interval. 

It seems that the trigger specification can be set in two places: in the GUI configuration for the job and in the pipeline itself.

Do I need to set both  trigger specifications (to the same specification)?

Do they have different purposes?

Best regards

David


Slide

unread,
Sep 25, 2019, 9:10:41 AM9/25/19
to Jenkins User Mailing List
The GUI portion is filled in by the pipeline once it has run once and the triggers and so forth have been processed. You can't change the cron in the GUI and have it work. It only works to change it in the pipeline itself.

--
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/CAJK_iei2XpTWYKTSmpyGqv1WiL21FwjTOgn5XG4KNXTeJjUpRA%40mail.gmail.com.


--

David Aldrich

unread,
Sep 26, 2019, 9:45:41 AM9/26/19
to jenkins...@googlegroups.com

>> We use declarative pipelines extensively, triggered by SCM change. We use a 

>> cron spec to specify a SCM polling interval. 

>> It seems that the trigger specification can be set in two places: in the GUI 

>> configuration for the job and in the pipeline itself.

 

>> Do I need to set both  trigger specifications (to the same specification)?


> The GUI portion is filled in by the pipeline once it has run once and the triggers and so 

> forth have been processed. You can't change the cron in the GUI and have it work. It 

> only works to change it in the pipeline itself.


I changed the trigger spec in the Jenkinsfile and ran the job again. The trigger spec in the GUI did not change.


Does this mean that the trigger spec in the GUI is irrelevant and can be left empty?

Reply all
Reply to author
Forward
0 new messages