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

Environment variables from setenv plugin are not inherited/parsed by batch tasks

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reopened (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: batch-task-plugin
    • Labels:
      None
    • Environment:
      Hudson 1.344, Hudson batch task plugin 1.12
    • Similar Issues:

      Description

      Some last Hudson version brought a new "Set environment variables" field in job configuration.
      This environment variables not inherited or parsed by shell tasks.

      One has to duplicate the needed variables in order to be used in task's script commands.

      Although the job's environment variables are passed, I've only tested these: parameter variables, $WORKSPACE, $JAVA_HOME, $CLEARCASE_VIEWNAME, etc. Global Environment variables set in hudson's configuration are also correctly parsed.

      I don't know if this an issue with tasks or because the "Set environment variables" field is coming after tasks definition in job's configuration view.

      Thanks in advance.


      UPDATED!

        Attachments

          Activity

          hmonteiro hmonteiro created issue -
          hmonteiro hmonteiro made changes -
          Field Original Value New Value
          Description Hudson build's environment environment variables are not inherited or parsed by shell. One has to duplicate the needed variables in order to be used in task's script commands.

          I presume none of the job's environment variables are passed, but I've only tested these: parameter variables, $WORKSPACE, $JAVA_HOME, $CLEARCASE_VIEWNAME.

          Also, build's new 'Set environment variables' field is also not inherited by tasks.

          As well as Hudson's global environment variables that can be configured in Hudson's Configuration panel.


          Thanks in advance.
          Some last Hudson version brought a new "Set environment variables" field in job configuration.
          This environment variables not inherited or parsed by shell tasks.

          One has to duplicate the needed variables in order to be used in task's script commands.

          Although the job's environment variables are passed, I've only tested these: parameter variables, $WORKSPACE, $JAVA_HOME, $CLEARCASE_VIEWNAME, etc. Global Environment variables set in hudson's configuration are also correctly parsed.

          I don't know if this an issue with tasks or because the "Set environment variables" field is coming after tasks definition in job's configuration view.


          Thanks in advance.

          --
          UPDATED!
          mindless Alan Harder made changes -
          Summary Environment variables are not inherited/parsed by tasks Environment variables from setenv plugin are not inherited/parsed by batch tasks
          mindless Alan Harder made changes -
          Assignee kohsuke [ kohsuke ] mindless [ mindless ]
          scm_issue_link SCM/JIRA link daemon made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]
          abayer Andrew Bayer made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          mwebber Matthew Webber made changes -
          Assignee Alan Harder [ mindless ] abayer [ abayer ]
          Resolution Fixed [ 1 ]
          Status Closed [ 6 ] Reopened [ 4 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 135672 ] JNJira + In-Review [ 185942 ]
          abayer Andrew Bayer made changes -
          Assignee Andrew Bayer [ abayer ]

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            hmonteiro hmonteiro
            Votes:
            2 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated: