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

SimpleBuildStep to receive EnvVars

    Details

    • Similar Issues:
    • Released As:
      Jenkins 2.241

      Description

      SimpleBuildStep.perform needs to be given an EnvVars argument. Otherwise there is no way for an implementation to observe any local environment variable settings.

        Attachments

          Issue Links

            Activity

            Hide
            zastai Tim Van Holder added a comment -

            Technically this issue won't be solved until workflow-basic-steps is updated too.

            Show
            zastai Tim Van Holder added a comment - Technically this issue won't be solved until workflow-basic-steps is updated too.
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            The Jenkins core patch was released in Jenkins 2.241

            Show
            oleg_nenashev Oleg Nenashev added a comment - The Jenkins core patch was released in Jenkins 2.241
            Hide
            zastai Tim Van Holder added a comment -

            Add link to draft plugin PR.

            Show
            zastai Tim Van Holder added a comment - Add link to draft plugin PR.
            Hide
            jglick Jesse Glick added a comment -

            The metastep system was not intended for use by domain-specific plugins, i.e. for anything other than core, wrap, and in the future perhaps checkout.

            Show
            jglick Jesse Glick added a comment - The metastep system was not intended for use by domain-specific plugins, i.e. for anything other than core , wrap , and in the future perhaps checkout .
            Hide
            zastai Tim Van Holder added a comment -

            Turns out that for my immediate purpose in my plugin, it was actually very easy to add support for getting environment variables by implementing a metastep (all my builders share a base class that implements the perform() anyway, so no SimpleBuildStep needed at all).

            The trick is to know that metasteps exist, which I didn't until I read the javadoc for isMetaStep() while going over what CoreStep does.
             

            Anyway, I've assigned this to myself and will look at setting up clones of jenkins and workflow-basic-steps-plugin to see what I can make work without breaking tests.

            And thanks for the pointer to the incrementals; that's useful info.

            Show
            zastai Tim Van Holder added a comment - Turns out that for my immediate purpose in my plugin, it was actually very easy to add support for getting environment variables by implementing a metastep (all my builders share a base class that implements the perform() anyway, so no SimpleBuildStep needed at all). The trick is to know that metasteps exist, which I didn't until I read the javadoc for isMetaStep() while going over what CoreStep does.   Anyway, I've assigned this to myself and will look at setting up clones of jenkins and workflow-basic-steps-plugin to see what I can make work without breaking tests. And thanks for the pointer to the incrementals; that's useful info.

              People

              • Assignee:
                zastai Tim Van Holder
                Reporter:
                jglick Jesse Glick
              • Votes:
                3 Vote for this issue
                Watchers:
                14 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: