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

Support multiple github checks against the same PR

      Currently, even if I have multiple folders or configurations of the branch source plugin configured, they all report as a single check against the PR.

      i.e. If I have repo x, that has an open PR id 123, and I have 2 configurations of branch source plugin each pointing to a different pipeline groovy file. The PR check status in Github will have the status of the project/build that finishes the last.

      It will be great if each of the branch source configurations can be differentiated using a name and their statuses can be reported as separate checks against the same GitHub PR.

       

      Usecase:

      For each open PR, I would like to run some tests against multiple platforms. Currently, I can do this by using different nodes in the pipeline. e.g. a part of the pipeline runs on a Linux node and the other on a windows node. The drawback of this current approach is, if one part of the pipeline fails, I need to run the whole pipeline again.

       

      Proposal:

      The proposal is to enable having multiple branch source configurations, and each of them report as a seprate check against the same PR. Hence, I could have multiple checks that run and report against the same open PR like - windows, linux and mac, etc. If one part of the pipeline fails, I can re-run that one alone instead of having to replay the whole pipeline. This will also enable breaking down my checks into smaller logical groups, rather than having them all in once single monolithic check.

       

      Note:

      • Please let me know if there is a way to do this already using the branch source plugin or using some other plugin
      • If this sounds like a good feature to be a part of the branch source plugin, I will be happy to spend sometime trying to build, if someone can guide me with some directions

       

          [JENKINS-65822] Support multiple github checks against the same PR

          Alex B added a comment - - edited

          +1 from my side.

          This also applies for commits and branches.

          The affected code is located here:
          https://github.com/jenkinsci/github-branch-source-plugin/blob/923184ce70fc84252937b8d08872f666efcc288b/src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubNotificationContext.java#L153-L163

           

          I think the most simple solution would be to report the full displayname instead of some randomly chosen string. Maybe prefix it with something (like "CI: Jenkins") to indicate that it was from Jenkins.

          The bitbucket-branch-source-plugin does it like this and it works perfectly:

          https://github.com/jenkinsci/bitbucket-branch-source-plugin/blob/ddedc5f2589ac454903beb983fbb4c58d9383425/src/main/java/com/cloudbees/jenkins/plugins/bitbucket/BitbucketBuildStatusNotifications.java#L122
          Example:

          Alex B added a comment - - edited +1 from my side. This also applies for commits and branches. The affected code is located here: https://github.com/jenkinsci/github-branch-source-plugin/blob/923184ce70fc84252937b8d08872f666efcc288b/src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubNotificationContext.java#L153-L163   I think the most simple solution would be to report the full displayname instead of some randomly chosen string. Maybe prefix it with something (like "CI: Jenkins") to indicate that it was from Jenkins. The bitbucket-branch-source-plugin does it like this and it works perfectly: https://github.com/jenkinsci/bitbucket-branch-source-plugin/blob/ddedc5f2589ac454903beb983fbb4c58d9383425/src/main/java/com/cloudbees/jenkins/plugins/bitbucket/BitbucketBuildStatusNotifications.java#L122 Example:

          If you suppress this feature of github-branch-source-plugin and instead use github-checks-plugin, I think you can then configure the name per project (properties.jelly, GitSCMStatusChecksExtension.java).

          Kalle Niemitalo added a comment - If you suppress this feature of github-branch-source-plugin and instead use github-checks-plugin, I think you can then configure the name per project ( properties.jelly , GitSCMStatusChecksExtension.java ).

          Alex B added a comment -

          kon
          Thank you for the feedback.
          I will test this plugin and see if it fit's my needs.

          Anyway I did research a bit more and I think the status check are currently like this because of https://issues.jenkins.io/browse/JENKINS-36574 (Someone might link that issue here).

          Alex B added a comment - kon Thank you for the feedback. I will test this plugin and see if it fit's my needs. Anyway I did research a bit more and I think the status check are currently like this because of https://issues.jenkins.io/browse/JENKINS-36574 (Someone might link that issue here).

            Unassigned Unassigned
            soorajshajahan Sooraj
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: