1

I created a GitHub Organization project on Jenkins. This scans my GitHub profile and sets up a Multibranch Pipeline (if I understood correctly). In the end I have a bunch of projects which are executed by the respective Jenkinsfiles. If I push something to GitHub or open new Pull Requests, Jenkins gets triggered and everything works as expected.

Unfortunately there is no way of configuring these Projects and I have a project which I want to build daily, regardless of changes on GitHub. Is there a way to trigger a single project daily? I am also fine with building every project daily.

Sorry, if I missed some information or said something wrong. Jenkins and its plugins are very hard to understand for me, at the moment. Please ask if something is unclear.

svenwltr
  • 17,002
  • 12
  • 56
  • 68
  • 1
    if you have access to the jenkinsfile, maybe this?: http://stackoverflow.com/questions/39168861/build-periodically-with-a-multi-branch-pipeline-in-jenkins – jmunsch Dec 22 '16 at 10:53
  • 1
    This works! That's exactly what I was looking for. Jenkins has a really bad documentation (or I didn't find the right one, yet). – svenwltr Dec 22 '16 at 11:10
  • I know the pain. haha. – jmunsch Dec 22 '16 at 11:21

1 Answers1

2

If you look at your Multibrach Pipeline then you will see a button Configure at the left side. If you click on there you get to the configuration of the project.

Note: If you do not see the button it is possible that you do not have sufficient permissions.


Once you are inside the configuration, there is a section called "build triggers" where you can check a checkbox to start the build time based/periodically.


Inside there you will have to add a so called cron expression.

Example:
H 7 * * * to start a build daily at 7AM.


Edit:
If you are not able to edit the configuration of a certain job it might be possible that you create a periodially scheduled Multijob Project that triggers a build on your original job.

Community
  • 1
  • 1
JDC
  • 4,247
  • 5
  • 31
  • 74
  • 1
    I can only view the configuration and not edit it. This might be because it is managed by the GitHub Organization plugin. I am the only user on this Jenkins, so I guess it isn't a permission problem. – svenwltr Dec 22 '16 at 11:04
  • This setting didn't work the way it sounds and was [removed](https://issues.jenkins-ci.org/browse/JENKINS-40921) – Michael Mrozek Mar 20 '17 at 01:46