简体   繁体   English

日程安排触发Jenkins GitHub Organization职位

[英]Jenkins GitHub Organization jobs triggered by schedule

I've setup an Octopus organization with multiple repositories inside. 我建立了一个带有多个存储库的章鱼组织。

One of those repositories has automated tests. 这些存储库之一具有自动测试。 I'm trying to setup the Jenkinsfile in that repo to make the job trigger periodically instead of only on SCM change. 我正在尝试在该存储库中设置Jenkinsfile,以使作业定期触发,而不是仅在更改SCM时触发。 I haven't found documentation that shows this is possible. 我还没有找到证明这是可能的文档。 Even the job, after is automatically created shows the BUILD TRIGGER option but of course it can't be saved. 即使作业在自动创建之后也会显示“ BUILD TRIGGER”选项,但当然无法保存。

Jenkins Organization Job Configuration Screenshot Jenkins组织作业配置屏幕截图

I found the way of doing this by using the "properties" option. 我找到了使用“属性”选项的方法。 In this example, the job will trigger by changes pushed to GitHub and also on a periodic basis (every 60 minutes): 在此示例中,作业将由推送到GitHub的更改触发,并且也会定期(每60分钟一次)触发:

properties([pipelineTriggers([cron('H/60 * * * *'), [$class: 'GitHubPushTrigger']])])

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM