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

WORKSPACE variable is not present in the Groovy script enviroment

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Critical
    • Resolution: Unresolved
    • Component/s: envinject-plugin
    • Labels:
      None
    • Environment:
      Jenkins 1.625.3
      EnvInject Plugin 1.92.2
      CentOS 6.8
    • Similar Issues:

      Description

      Writing a groovy script in this plugin I notice that the variable WORKSPACE is not avaiable to the goovy script neither in binding.variable nor in System.getenv()

      Debugging a lot I found that for some reason WORKSPACE variable is set after execution of groovy script and became avaiable for the other kind of variable injection:

      • Properties File Path
      • Properties Content
        and I've found no war to access neither by currentJob nor by currentRun

      So please set variable before run the groovy script.

        Attachments

          Activity

          Hide
          nfalco Nikolas Falco added a comment - - edited

          I propose this PR

          Show
          nfalco Nikolas Falco added a comment - - edited I propose this PR
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          Unfortunately I will not have time to work on EnvInject issues for a while. I decided to unassign all issues so that somebody can take them and finalize.

          Context: The plugin has been waiting for adoption for ~2 years. During all this time I was trying to keep this plugin afloat by reviewing the incoming pull requests, fixing defects and keeping the codebase up to date to simplify the handover. But I have not been using this plugin on my own so that such maintenance was a bit lame. I invite all active users to contribute to the plugin by taking ownership of this plugin and of EnvInject API. I am happy to provide any required knowledge transfers and do some assistance during the first months of maintenance

          Show
          oleg_nenashev Oleg Nenashev added a comment - Unfortunately I will not have time to work on EnvInject issues for a while. I decided to unassign all issues so that somebody can take them and finalize. Context: The plugin has been waiting for adoption for ~2 years. During all this time I was trying to keep this plugin afloat by reviewing the incoming pull requests, fixing defects and keeping the codebase up to date to simplify the handover. But I have not been using this plugin on my own so that such maintenance was a bit lame. I invite all active users to contribute to the plugin by taking ownership of this plugin and of EnvInject API. I am happy to provide any required knowledge transfers and do some assistance during the first months of maintenance

            People

            • Assignee:
              Unassigned
              Reporter:
              nfalco Nikolas Falco
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: