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

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

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Environment variables set for a job with the "Prepare an environment for the run" and not processed/used for batch tasks. This is very similar to bug JENKINS-5580 reported for batch tasks and the now deprecated setenv plugin

        Attachments

          Activity

          Hide
          jcarsique Julien Carsique added a comment - - edited

          Reproduced again with Jenkins 1.472, Batch task 1.16 and Rebuilder 1.14:

          Jul 27, 2012 9:16:25 AM hudson.model.Executor run
          SEVERE: Executor threw an exception
          java.lang.NullPointerException: Current Project is null
                  at com.sonyericsson.rebuild.RebuildAction.getProject(RebuildAction.java:129)
                  at com.sonyericsson.rebuild.RebuildAction.isRebuildAvailable(RebuildAction.java:227)
                  at com.sonyericsson.rebuild.RebuildAction.getUrlName(RebuildAction.java:154)
                  at org.jenkinsci.lib.envinject.service.EnvInjectActionRetriever.getEnvInjectAction(EnvInjectActionRetriever.java:32)
                  at org.jenkinsci.lib.envinject.service.EnvVarsResolver.getEnVars(EnvVarsResolver.java:51)
                  at hudson.plugins.batch_task.BatchRun.run(BatchRun.java:224)
                  at hudson.model.ResourceController.execute(ResourceController.java:88)
                  at hudson.model.Executor.run(Executor.java:236)
          

          Downgrading again to Batch task 1.15 as a workaround.

          Show
          jcarsique Julien Carsique added a comment - - edited Reproduced again with Jenkins 1.472, Batch task 1.16 and Rebuilder 1.14: Jul 27, 2012 9:16:25 AM hudson.model.Executor run SEVERE: Executor threw an exception java.lang.NullPointerException: Current Project is null at com.sonyericsson.rebuild.RebuildAction.getProject(RebuildAction.java:129) at com.sonyericsson.rebuild.RebuildAction.isRebuildAvailable(RebuildAction.java:227) at com.sonyericsson.rebuild.RebuildAction.getUrlName(RebuildAction.java:154) at org.jenkinsci.lib.envinject.service.EnvInjectActionRetriever.getEnvInjectAction(EnvInjectActionRetriever.java:32) at org.jenkinsci.lib.envinject.service.EnvVarsResolver.getEnVars(EnvVarsResolver.java:51) at hudson.plugins.batch_task.BatchRun.run(BatchRun.java:224) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:236) Downgrading again to Batch task 1.15 as a workaround.
          Hide
          mrkk kalpesh soni added a comment - - edited

          I dont think I use rebuilder

          mine is

          Feb 20, 2013 2:28:54 PM hudson.model.Executor run
          SEVERE: Executor threw an exception
          java.lang.NullPointerException
          	at org.jenkinsci.lib.envinject.service.EnvInjectActionRetriever.getEnvInjectAction(EnvInjectActionRetriever.java:32)
          	at org.jenkinsci.lib.envinject.service.EnvVarsResolver.getEnVars(EnvVarsResolver.java:51)
          	at hudson.plugins.batch_task.BatchRun.run(BatchRun.java:224)
          	at hudson.model.ResourceController.execute(ResourceController.java:88)
          	at hudson.model.Executor.run(Executor.java:236)
          

          latest jenkins 1.499 batch task 1.16

          Show
          mrkk kalpesh soni added a comment - - edited I dont think I use rebuilder mine is Feb 20, 2013 2:28:54 PM hudson.model.Executor run SEVERE: Executor threw an exception java.lang.NullPointerException at org.jenkinsci.lib.envinject.service.EnvInjectActionRetriever.getEnvInjectAction(EnvInjectActionRetriever.java:32) at org.jenkinsci.lib.envinject.service.EnvVarsResolver.getEnVars(EnvVarsResolver.java:51) at hudson.plugins.batch_task.BatchRun.run(BatchRun.java:224) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:236) latest jenkins 1.499 batch task 1.16
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Gregory Boissinot
          Path:
          pom.xml
          http://jenkins-ci.org/commit/batch-task-plugin/0ebcd0b025c5f85ac9addc530cf21da8d72c2b99
          Log:
          Fix JENKINS-13647


          You received this message because you are subscribed to the Google Groups "Jenkins Commits" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-commits+unsubscribe@googlegroups.com.
          For more options, visit https://groups.google.com/groups/opt_out.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Gregory Boissinot Path: pom.xml http://jenkins-ci.org/commit/batch-task-plugin/0ebcd0b025c5f85ac9addc530cf21da8d72c2b99 Log: Fix JENKINS-13647 – You received this message because you are subscribed to the Google Groups "Jenkins Commits" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-commits+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out .
          Hide
          gbois Gregory Boissinot added a comment -

          There is an issue for recent Jenkins core version.

          Show
          gbois Gregory Boissinot added a comment - There is an issue for recent Jenkins core version.
          Hide
          basharimovvv basharimovvv added a comment -

          Jenkins ver. 1.515
          Environment Injector Plugin 1.86
          Jenkins batch task plugin 1.17

          Build describes env vars on "Prepare an environment for the run". There is injectedEnvVars.txt and there is the env var there. But run of batch task does not load them.

          Show
          basharimovvv basharimovvv added a comment - Jenkins ver. 1.515 Environment Injector Plugin 1.86 Jenkins batch task plugin 1.17 Build describes env vars on "Prepare an environment for the run". There is injectedEnvVars.txt and there is the env var there. But run of batch task does not load them.

            People

            • Assignee:
              gbois Gregory Boissinot
              Reporter:
              tsondergaard tsondergaard
            • Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated: