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

Environment variables defined in node configuration disappearing (not set) when system under load

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • None
    • OS for master and slave are Linux RHEL 5
      Running Hudson 1.374

      I run nightly builds in order to get additional metrics recorded at night. So, I have about 50 builds that all queue up at 11pm every night. The issue is that I will have from 1 - 5 jobs fail at night due to an environment variable not being picked up. It'll run fine if I just rerun the job by forcing it, though. Any ideas why Hudson will basically lose the definition of the defined environment variable (defined in node config in Hudson), but only when during this loaded up nightly run?

      Here's the output from one of the jobs:
      Buildfile: /usr/local/hudson/workspace/scrs-nightly/scripts/build.xml

      BUILD FAILED
      /usr/local/hudson/workspace/scrs-nightly/scripts/build.xml:27: /usr/local/hudson/workspace/scrs-nightly/scripts/${env.cobertura.home}/lib does not exist.

      Total time: 2 seconds

      My build script looks like this:
      <project name="scrs-dev" default="build">

      <property environment="env"/>

      <property name="ant.build.javac.target" value="1.5"/>
      <property name="ant.build.javac.source" value="1.5"/>

      <property file="ant_build.properties"/>
      <property name="output.dir" value="${project.dir}/target"/>
      <property name="build.dir" value="${project.dir}/build"/>

      <path id="cobertura.classpath">
      <pathelement path="${cobertura.home}/cobertura.jar" />
      <fileset dir="${cobertura.home}/lib">
      <include name="*/.jar" />
      </fileset>
      </path>
      <taskdef classpath="${cobertura.home}/cobertura.jar" resource="tasks.properties" classpathref="cobertura.classpath" />
      ...

      The ${cobertura.home} is defined in the property file referenced right after the environment as:

      1. The following are added for Hudson Support
        project.dir=${env.WORKSPACE}
        base.dir=${env.WORKSPACE}/source
        cobertura.home=${env.cobertura.home}

      The env.cobertura.home is defined in the remote node configuration this job runs on with:
      name: cobertura.home
      value: /usr/local/Hudson/tools/cobertura-1.9.4.1

            Unassigned Unassigned
            robertredd robertredd
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: