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

Better Swarm integration when using source "Helix Swarm"

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      When builds are triggered from Swarm you can provide a pass and fail URL to update the Swarm test status icon on job SUCCESS or FAIL.

      If you use Helix Swarm as the branch source in Jenkins you get the reviews appearing under a 'Reviews' tab:

      but you dont get the test status pased back to Swarm.

       

      It would be great if either there was a new endpoint so reviews could be triggered from Swarm and the jobs be placed under a review tab, or that test status is updated in Swarm at the end of a Helix Swarm job.

       

        Attachments

          Activity

          Hide
          p_hampson Paul "TBBle" Hampson added a comment - - edited

          Since we already have the p4Approve step (which could also be used to up-vote from the CI user), a simple p4ReviewState step along the same lines would allow this to be part of the pipeline script in both Multibranch Pipeline and normal Pipeline jobs.

          It'd be nicer if this was automatically propagated back to a review at the end of a Multibranch Pipeline run from the Helix Swarm branch source triggered by a review (triggered once that is implemented, or multibranch scan), but it seems p4ReviewState is still useful for the remaining cases where the plugin doesn't know it's a review, but the Pipeline script writer does.

          I see that the existing Build Review Action support passes URLs to post on success and failure. I can't see an obvious API method for adding to the testDetails and setting the testStatus of a Review, but I assume that is possible because Build Review Action flow provides such a URL. Hopefully that doesn't depend on embedding some secret token in that URL.

          Edit: Ah, dagnabbit. There is a secret token:

          {update}, {pass}, and {fail} are composed automatically by Swarm. They include Swarm's own per-review authentication tokens.

          Short of significant refactoring, I guess the best bet is either allowing an authenticated Swarm user to not require the secret token, or to have the relevant secret token (or full update URL) put into the scm object that the Helix Swarm branch source provides to the Multibranch Pipeline job, and could be consumed by a p4AddTestState step.

          Show
          p_hampson Paul "TBBle" Hampson added a comment - - edited Since we already have the p4Approve step (which could also be used to up-vote from the CI user), a simple p4ReviewState step along the same lines would allow this to be part of the pipeline script in both Multibranch Pipeline and normal Pipeline jobs. It'd be nicer if this was automatically propagated back to a review at the end of a Multibranch Pipeline run from the Helix Swarm branch source triggered by a review (triggered once that is implemented, or multibranch scan), but it seems p4ReviewState is still useful for the remaining cases where the plugin doesn't know it's a review, but the Pipeline script writer does. I see that the existing Build Review Action support passes URLs to post on success and failure. I can't see an obvious API method for adding to the testDetails and setting the testStatus of a Review, but I assume that is possible because Build Review Action flow provides such a URL. Hopefully that doesn't depend on embedding some secret token in that URL. Edit: Ah, dagnabbit. There is a secret token : { update }, { pass }, and { fail } are composed automatically by Swarm. They include Swarm's own per-review authentication tokens. Short of significant refactoring, I guess the best bet is either allowing an authenticated Swarm user to not require the secret token, or to have the relevant secret token (or full update URL) put into the scm object that the Helix Swarm branch source provides to the Multibranch Pipeline job, and could be consumed by a p4AddTestState step.

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            p4karl Karl Wirth
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: