Hello,
In previous versions of Jenkins LTS there was a jenkins-cli.jar which I used to trigger a build job. Now with the latest (2.222.1) I can’t find how to do the build jobs on a scheduled base. Where one is shedules at 19:00, the other on 20:30, etc… They can’t run at same time due resources limits. What is the best option to execute a single build job in a multi branch pipeline?
Kind regards,
Roel de Wildt
Software Engineer
I have looked at it but it seems only possible if I change our Jenkinsfile within each project stored in svn within the branches of it. And I can’t see where to put the cron entry in the multi branch pipeline. I have only the following options (… 12 hours, 1 day, 2 days, etc… ) in “Periodically if not otherwise run” in the triggers section.
That means I can’t control the time it will be executed.
Alternative:
I can execute a scheduled curl program which triggers the “trunk” successfully, but the “branches/2019/trunk” gives a http 404 error.
Kind regards,
Roel de Wildt
Software Engineer
--
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/c96a2c92-9eb4-4e3e-9323-63c829418bc3%40googlegroups.com.
pipeline { | |
triggers { | |
// runs every two hours | |
cron('H H/2 * * *') | |
} | |
steps { | |
// lock not usable in declarative pipeline due to JENKINS-43002 | |
script { lock(label: resourceLabel, quantity: 1) { |
To unsubscribe from this group and stop receiving emails from it, send an email to jenkins...@googlegroups.com.
My thanks for the solution you gave me.
I have implemented this solution with the cron entry and the resource lock. Now the pipelines are triggered at 19:00 and executed sequential, but my concerns are when we create a branch of them that they are also executed daily. That is not what I want to happen. It should be a manual action to build those branches.
Because the Jenkinsfile is stored in our svn project and the trigger is also in the Jenkinsfile. I think when I make a branch for a new release version of the product it would also executed at 19:00. How can I prevent this from triggering without adjusting the Jenkinsfile for every branch?
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/f880bc76-6669-401b-b1b4-b588e4c794df%40googlegroups.com.