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

UCM 0.8:; Environment variables no longer available to Batch task

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • clearcase-plugin
    • None
    • Platform: All, OS: All

      After moving from 0.6.x yo 0.8.x UCM plugin the environment variable
      CLEARCASE_VIEWNAME (and presumeable CLEARCASE_VIEWPATH are no longer resolved
      when running a "batch task" plugin....

      The ant task run as part of the batch task can no longer expand

      {env.CLEARCASE_VIEWNAME}

      .

          [JENKINS-2791] UCM 0.8:; Environment variables no longer available to Batch task

          sunfire added a comment -

          Im guessing that you are running an Ant task BEFORE anything else? The reason
          for the change is that we wanted to fix issue 2606 and therefore "removed" the
          caching of the viewname that was evaluated only once. Since slaves then would
          have the wrong viewname it broke the builds on the slaves.
          Not exactly sure how to fix this problem without breaking slave builds again.
          If the batch task is running AFTER a checkout for example it should work.

          sunfire added a comment - Im guessing that you are running an Ant task BEFORE anything else? The reason for the change is that we wanted to fix issue 2606 and therefore "removed" the caching of the viewname that was evaluated only once. Since slaves then would have the wrong viewname it broke the builds on the slaves. Not exactly sure how to fix this problem without breaking slave builds again. If the batch task is running AFTER a checkout for example it should work.

          jmarnaud added a comment -

          I am using hudson 1.323 and clearcase plugin 1.0.2
          My projects use clearcase UCM and the build scripts need the 2 variables
          CLEARCASE_VIEWNAME and CLEARCASE_VIEWPATH

          These 2 variables are often resolved but sometimes they are not resolved. Let's
          say 1/10 (once it's not resolved , 9 times it's fine).

          For instance log error when I want to use an ant script specifying a build.xml
          FATAL: Unable to find build script at
          /app/PROJECT/build/IC/HUDSON_HOME/jobs/INT-build-UI/workspace/${CLEARCASE_VIEWNAME}/vobs/kormo_ui/ui/misc/build.xml

          This is really annoying since we are using the continuous integration game
          plugin , and dev are not happy to loose points when the build fails because
          these 2 variables are not resolved

          For few critical projects , I decided to harcode the clearcase viewname to avoid
          this situation but I would prefer not hardcode it

          jmarnaud added a comment - I am using hudson 1.323 and clearcase plugin 1.0.2 My projects use clearcase UCM and the build scripts need the 2 variables CLEARCASE_VIEWNAME and CLEARCASE_VIEWPATH These 2 variables are often resolved but sometimes they are not resolved. Let's say 1/10 (once it's not resolved , 9 times it's fine). For instance log error when I want to use an ant script specifying a build.xml FATAL: Unable to find build script at /app/PROJECT/build/IC/HUDSON_HOME/jobs/INT-build-UI/workspace/${CLEARCASE_VIEWNAME}/vobs/kormo_ui/ui/misc/build.xml This is really annoying since we are using the continuous integration game plugin , and dev are not happy to loose points when the build fails because these 2 variables are not resolved For few critical projects , I decided to harcode the clearcase viewname to avoid this situation but I would prefer not hardcode it

          Could this be related to JENKINS-5430 ? In my case I only noticed the problem when I submit a job when it is actually updating the view.

          Vincent Latombe added a comment - Could this be related to JENKINS-5430 ? In my case I only noticed the problem when I submit a job when it is actually updating the view.

            sunfire sunfire
            lynggaard lynggaard
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated: