Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-38409

Cancel ongoing testing of current PR if the PR gets updated with new/changed commits

    XMLWordPrintable

Details

    Description

      This was introduced recently in the GitHub integration plugin. Is kind of pointless to keep testing an outdated PR once the code in it was changed, so there should be an option to, in the case of a PR code update (changed or new commits), current and queued job(s) for that PR should be aborted and only the job testing the last changes should run.

      Attachments

        Issue Links

          Activity

            BTW, for this plugin is even worse, because there seems to be no way to tell jenkins to not run multiple jobs in parallel for one branch/PR, so rapidly updating a PR will just trigger loads of jobs running in parallel, creating some sort of internal DoS for other jobs, which is particularly bad for workflows when doing small, frequent updates to PRs is common.

            lucasocio Leandro Lucarella added a comment - BTW, for this plugin is even worse, because there seems to be no way to tell jenkins to not run multiple jobs in parallel for one branch/PR, so rapidly updating a PR will just trigger loads of jobs running in parallel, creating some sort of internal DoS for other jobs, which is particularly bad for workflows when doing small, frequent updates to PRs is common.

            You can control concurrency by altering your properties(...) call based on if $BRANCH_NAME begins with "PR" or not.

            Does this article help you? https://jenkins.io/blog/2016/10/16/stage-lock-milestone/

            Again, detecting if $BRANCH_NAME starts with "PR"...

            docwhat Christian Höltje added a comment - You can control concurrency by altering your properties(...) call based on if $BRANCH_NAME begins with "PR" or not. Does this article help you? https://jenkins.io/blog/2016/10/16/stage-lock-milestone/ Again, detecting if $BRANCH_NAME starts with "PR"...

            The GitHub Org Folders plugin is being tombstoned.

            The functionality provided by the GitHub Org Folders plugin has been significantly refactored and migrated to the GitHub Branch Source plugin.

            Please verify if this issue is an issue with GitHub Branch Source 2.0.0-beta-1 (available from the experimental update center now or 2.0.0 (available in early January 2017)

            stephenconnolly Stephen Connolly added a comment - The GitHub Org Folders plugin is being tombstoned. The functionality provided by the GitHub Org Folders plugin has been significantly refactored and migrated to the GitHub Branch Source plugin. Please verify if this issue is an issue with GitHub Branch Source 2.0.0-beta-1 (available from the experimental update center now or 2.0.0 (available in early January 2017)

            How does Lock plugin cancel a PR running on a previous commit? I don't quite get it.

            puneeth_n Puneeth Nanjundaswamy added a comment - How does Lock plugin cancel a PR running on a previous commit? I don't quite get it.

            People

              kohsuke Kohsuke Kawaguchi
              lucasocio Leandro Lucarella
              Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: