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

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

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • batch-task-plugin
    • None
    • Hudson 1.344, Hudson batch task plugin 1.12

      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!

          [JENKINS-5580] Environment variables from setenv plugin are not inherited/parsed by batch tasks

          hmonteiro created issue -
          hmonteiro made changes -
          Description Original: 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.
          New: 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!
          Alan Harder made changes -
          Summary Original: Environment variables are not inherited/parsed by tasks New: Environment variables from setenv plugin are not inherited/parsed by batch tasks
          Alan Harder made changes -
          Assignee Original: Kohsuke Kawaguchi [ kohsuke ] New: Alan Harder [ mindless ]
          SCM/JIRA link daemon made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          Andrew Bayer made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]
          Matthew Webber made changes -
          Assignee Original: Alan Harder [ mindless ] New: Andrew Bayer [ abayer ]
          Resolution Original: Fixed [ 1 ]
          Status Original: Closed [ 6 ] New: Reopened [ 4 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 135672 ] New: JNJira + In-Review [ 185942 ]
          Andrew Bayer made changes -
          Assignee Original: Andrew Bayer [ abayer ]

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

              Created:
              Updated: