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

PATCH: CommandInterpreter.join(...) doesn't have access to the Build object

    Details

    • Similar Issues:

      Description

      core/src/main/java/hudson/tasks/CommandInterpreter.java defines a join(Proc p) method that's supposed to be able to set the result to Result.UNSTABLE.

      However, it has no access to the build object to call setResult(...)

      It's an extension point, so while it's not used in-tree it isn't clear if there might be out-of-tree code using it. As such just replacing it with a version that takes more parameters may not be wise.

      I think it's necessary to add a member variable to track the build and a protected accessor; that way the same call interface can be retained. Patch pending.

        Attachments

          Issue Links

            Activity

            Show
            ringerc Craig Ringer added a comment - Created https://github.com/jenkinsci/jenkins/pull/1324
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Craig Ringer
            Path:
            core/src/main/java/hudson/tasks/CommandInterpreter.java
            http://jenkins-ci.org/commit/jenkins/3c85fd74cbaf38e39e8675b15dfe6ef6ada91081
            Log:
            JENKINS-23896 Give CommandInterpreter.join(Proc p) access to Build

            The CommandInterpreter.join(Proc p) method is supposed to be an extension
            point to allow an UNSTABLE build result to be set, but it has no access to
            the Build object with which to do so.

            Add a getBuild() method that returns the build passed to perform(...). A better
            API would be a new join(...) with more arguments, but that'd break out of tree
            plugins that might already be using this for other purposes.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Craig Ringer Path: core/src/main/java/hudson/tasks/CommandInterpreter.java http://jenkins-ci.org/commit/jenkins/3c85fd74cbaf38e39e8675b15dfe6ef6ada91081 Log: JENKINS-23896 Give CommandInterpreter.join(Proc p) access to Build The CommandInterpreter.join(Proc p) method is supposed to be an extension point to allow an UNSTABLE build result to be set, but it has no access to the Build object with which to do so. Add a getBuild() method that returns the build passed to perform(...). A better API would be a new join(...) with more arguments, but that'd break out of tree plugins that might already be using this for other purposes.

              People

              • Assignee:
                Unassigned
                Reporter:
                ringerc Craig Ringer
              • Votes:
                1 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated: