Delay automatic rebuilding when a commit is pushed on master/upstream

This issue is archived. You can view it, but you can't modify it. Learn more

      Hello,

      I currently have a multibranch pipeline on Jenkins which rebuilds all of the open PRs (and aborts the running builds) when a commit is pushed to master (i.e. when a branch is merged).

      However, I have an optional stage which allows me to run some tests in the PRs. These tests can take up to several hours

      Ideally, once a commit is pushed to master, I would like to wait for these optional tests on the PRs to be over before rebuilding all of the PRs, in order not to abort them.

      At first, I thought of a read-write lock using temporary files on my workspace. However, this won't work since the PRs are rebuildedĀ beforeĀ entering the Jenkinsfile.

      The best I could find was the "Ignore rebuilding merge branches when only the target branch changed" option fromĀ Basic Branch Build StrategiesĀ but this simply prevents the PR rebuilds, instead of delaying them.

      Do you have any ideas about a possible workaround for this? Any help would be greatly appreciated.

            Assignee:
            Unassigned
            Reporter:
            Kevin Mt
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: