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

Shell Variable "WORKSPACE" not set

    XMLWordPrintable

Details

    Description

      After updating jenkins to the version 1.552/1.553 the variable "WORKSPACE" has the value "jenkins" and not the real path to the workspace.

      Attachments

        Activity

          abo Axel Bodemer added a comment -

          An other testcase which may be shot in the same direction:
          About a promotion->parameterized-trigger->downstream-ext I start manually a jenkins-job as a subtasks. This hang at the point "[EnvInject] - Injecting contributions.". If I cancel this subtask, I have got following error message:

          Run condition [Always] enabling perform for step [Shell ausführen]
          11:04:48 ERROR: Publisher org.jenkins_ci.plugins.flexible_publish.FlexiblePublisher aborted due to exception
          11:04:48 java.lang.NullPointerException: no workspace from node hudson.model.Hudson@3d03a85f which is computer hudson.model.Hudson$MasterComputer@29c6774 and has channel hudson.remoting.LocalChannel@25e48494
          11:04:48 at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:76)
          11:04:48 at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:66)
          11:04:48 at org.jenkins_ci.plugins.run_condition.BuildStepRunner$2.run(BuildStepRunner.java:110)
          11:04:48 at org.jenkins_ci.plugins.run_condition.BuildStepRunner$Fail.conditionalRun(BuildStepRunner.java:154)
          11:04:48 at org.jenkins_ci.plugins.run_condition.BuildStepRunner.perform(BuildStepRunner.java:105)
          11:04:48 at org.jenkins_ci.plugins.flexible_publish.ConditionalPublisher.perform(ConditionalPublisher.java:134)
          11:04:48 at org.jenkins_ci.plugins.flexible_publish.FlexiblePublisher.perform(FlexiblePublisher.java:111)
          11:04:48 at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
          11:04:48 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804)
          11:04:48 at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:776)
          11:04:48 at hudson.model.Build$BuildExecution.post2(Build.java:183)
          11:04:48 at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:725)
          11:04:48 at hudson.model.Run.execute(Run.java:1701)
          11:04:48 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
          11:04:48 at hudson.model.ResourceController.execute(ResourceController.java:88)
          11:04:48 at hudson.model.Executor.run(Executor.java:231)

          abo Axel Bodemer added a comment - An other testcase which may be shot in the same direction: About a promotion->parameterized-trigger->downstream-ext I start manually a jenkins-job as a subtasks. This hang at the point " [EnvInject] - Injecting contributions.". If I cancel this subtask, I have got following error message: Run condition [Always] enabling perform for step [Shell ausführen] 11:04:48 ERROR: Publisher org.jenkins_ci.plugins.flexible_publish.FlexiblePublisher aborted due to exception 11:04:48 java.lang.NullPointerException: no workspace from node hudson.model.Hudson@3d03a85f which is computer hudson.model.Hudson$MasterComputer@29c6774 and has channel hudson.remoting.LocalChannel@25e48494 11:04:48 at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:76) 11:04:48 at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:66) 11:04:48 at org.jenkins_ci.plugins.run_condition.BuildStepRunner$2.run(BuildStepRunner.java:110) 11:04:48 at org.jenkins_ci.plugins.run_condition.BuildStepRunner$Fail.conditionalRun(BuildStepRunner.java:154) 11:04:48 at org.jenkins_ci.plugins.run_condition.BuildStepRunner.perform(BuildStepRunner.java:105) 11:04:48 at org.jenkins_ci.plugins.flexible_publish.ConditionalPublisher.perform(ConditionalPublisher.java:134) 11:04:48 at org.jenkins_ci.plugins.flexible_publish.FlexiblePublisher.perform(FlexiblePublisher.java:111) 11:04:48 at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) 11:04:48 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804) 11:04:48 at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:776) 11:04:48 at hudson.model.Build$BuildExecution.post2(Build.java:183) 11:04:48 at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:725) 11:04:48 at hudson.model.Run.execute(Run.java:1701) 11:04:48 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) 11:04:48 at hudson.model.ResourceController.execute(ResourceController.java:88) 11:04:48 at hudson.model.Executor.run(Executor.java:231)
          abo Axel Bodemer added a comment -

          An other fact is, jenkins create the workspace in the path "/root/jenkins/". In the post build process, I write now the environment variables to a file. Here are the most importants:

          HUDSON_HOME=/intranet/jenkins
          JENKINS_HOME=/intranet/jenkins
          HOME=/root
          PWD=/root/jenkins
          WORKSPACE=jenkins

          abo Axel Bodemer added a comment - An other fact is, jenkins create the workspace in the path "/root/jenkins/". In the post build process, I write now the environment variables to a file. Here are the most importants: HUDSON_HOME=/intranet/jenkins JENKINS_HOME=/intranet/jenkins HOME=/root PWD=/root/jenkins WORKSPACE=jenkins
          danielbeck Daniel Beck added a comment -

          Which version are you updating from? Does it happen with projects not using EnvInject, or on instances where EnvInject is not installed? Did you upgrade any plugins around the same time this broke?

          danielbeck Daniel Beck added a comment - Which version are you updating from? Does it happen with projects not using EnvInject, or on instances where EnvInject is not installed? Did you upgrade any plugins around the same time this broke?
          abo Axel Bodemer added a comment -

          We used the Jenkins ver. 1.525.

          The information about a installed plugin "EnvInject" are strange, because in the file path exist the version "1.89". The jenkins-plugin-manager said, that it is not installed and it is not listed for an installation or an update.

          abo Axel Bodemer added a comment - We used the Jenkins ver. 1.525. The information about a installed plugin "EnvInject" are strange, because in the file path exist the version "1.89". The jenkins-plugin-manager said, that it is not installed and it is not listed for an installation or an update.
          abo Axel Bodemer added a comment -

          We updated our jenkins last week to the version 1.596. Now it works.

          abo Axel Bodemer added a comment - We updated our jenkins last week to the version 1.596. Now it works.

          People

            domi Dominik Bartholdi
            abo Axel Bodemer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: