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

Richer return value for build step

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Major Major
    • pipeline
    • None

      Currently the build step will either return Result.SUCCESS, or fail. It should rather return some POJO with whitelisted methods to get the result, get a number/URL, set a description, and so on.

      The obvious fix is to just return the Run. The problem is how to allow setDescription. This checks UPDATE, so as a rule it should be allowed only when running with a defined authentication. But flows usually do not run with any authentication, in which case this would fail—even though we should arguably always allow it on a build we triggered ourselves. On the other hand, it is desirable going forward to ask for authentication on projects, in which case you would need some permission on the downstream project to trigger its build anyway.

      Compatibility: the current return value is useless and so no one would be relying on it, but some scripts may be relying on a non-stable downstream build failing the flow, so it should be an option to allow the flow to proceed even if the downstream build is not stable (in which case the new return value takes effect).

            jglick Jesse Glick
            jglick Jesse Glick
            Votes:
            4 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: