Sebastian, here's a snippet of a declarative Jenkinsfile pipeline showing a 
time-based (cron) trigger:

pipeline {
  triggers {
    // every 30 minutes during 9 hours each night
    cron('H/30 20,21,22,23,0,1,2,3,4 * * *')
  }
  agent { label 'docker' }
  environment {
    GIT_COMMITTER_NAME = 'jenkins'
    GIT_COMMITTER_EMAIL = 'jenk...@jenkins.io'
  }
  stages {
    stage('setup') {
    .....

On Friday, January 27, 2017 at 4:58:21 AM UTC-5, Sebastian Gurlt wrote:
>
> Hey,
>
> I want to do the same with automatic time based builds, any hint how I 
> could implement this ? :)
>
> Greetings
> Sebastian
>
> Am Freitag, 12. August 2016 20:55:03 UTC+2 schrieb John Engelman:
>>
>> I was able to get the branch to enable the trigger by adding the 
>> following to my Jenkinsfile:
>>
>> properties([
>>     pipelineTriggers([
>>       [$class: "GitHubPushTrigger"]
>>     ])
>>   ])
>>
>> I then manually executed a Branch Index on the parent job and the 
>> resulting PR builds had the trigger on push setting enabled.
>>
>> On Thursday, August 11, 2016 at 9:01:19 AM UTC-5, Michal Medvecky wrote:
>>>
>>> I see that the related issue was resolved, but I still don't know how to 
>>> add "Build when a change is pushed to GitHub" support to my Jenkinsfile.
>>>
>>> Can anyone help me please?
>>>
>>> Michal
>>>
>>

-- 
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/4c299cfe-887a-4729-9a34-235d6c5c971f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to