I have a Bitbucket Server Project.
I am using declarative Jenkinsfiles
All branches/PRs of all repos in the Project are built if they have a
Jenkinsfile. Wonderful.
The branches/PRs are built when there is new git activity. Wonderful.
There is one repo with 2 requirements that I'm stuck on:
1. It cannot run when anything else is running, not even other branches of
itself. I already have disableConcurrentBuilds() but then I can still run
different branches in parallel and I don't want that. I know about the
Build Blocker plugin and I would put this in my Jenkinsfile, but I don't
know where to put it:
blockOn('.*') {
blockLevel('GLOBAL')
scanQueueFor('ALL')
}
2. That particular job, any branch of it, is only allowed to start between
specific hours, regardless of how it got triggered. I don't know how to put
that in my Jenkinsfile. I looked at quietPeriod and rateLimitBuilds, but
they seem to be for something else.
I had a third question about how to schedule it with cron, but I found that
myself already:
triggers {
cron('H H(0-6) * * 1-5')
}
meaning anywhere between midnight and 6 AM on work days.
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/4a9b4e89-6705-47ad-b72d-bdf9007d5885%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.