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

COMPUTERNAME is allways resolved to master

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • clearcase-plugin
    • None
    • Platform: All, OS: All

    Description

      Hi,

      in mkview field ${COMPUTERNAME} is allways resolved to 'master'. If i look at
      variables in 'http://sputnik:8080/systemInfo' the right computername is there:
      COMPUTERNAME = SPUTNIK. So i cannot use mkview like expected:
      -vws \\${COMPUTERNAME}\cc_store\db\${CLEARCASE_VIEWNAME}.vws

      see also: https://hudson.dev.java.net/issues/show_bug.cgi?id=2994

      Andre

      Attachments

        Activity

          anb0s anb0s added a comment -

          I browsed the code:
          http://fisheye4.atlassian.com/browse/hudson/trunk/hudson/plugins/clearcase/src/main/java/hudson/plugins/clearcase/util/BuildVariableResolver.java?r=15761

          Lines 60-67: Resolution of COMPUTERNAME is identic to NODE_NAME! Why?
          For COMPUTERNAME it should be something like: build.getEnvVars().get(key)

          Andre

          anb0s anb0s added a comment - I browsed the code: http://fisheye4.atlassian.com/browse/hudson/trunk/hudson/plugins/clearcase/src/main/java/hudson/plugins/clearcase/util/BuildVariableResolver.java?r=15761 Lines 60-67: Resolution of COMPUTERNAME is identic to NODE_NAME! Why? For COMPUTERNAME it should be something like: build.getEnvVars().get(key) Andre
          sunfire sunfire added a comment -

          I've no idea. I haven't written that code, but it sure looks suspicious.

          sunfire sunfire added a comment - I've no idea. I haven't written that code, but it sure looks suspicious.
          abayer Andrew Bayer added a comment -

          You can access environment variables that aren't specified explicitly in
          BuildVariableResolver - I'm thinking we should probably end up just removing
          COMPUTERNAME from BuildVariableResolver altogether, since that's a
          Windows-specific variable. If you'd like, I can build a private version of
          clearcase.hpi for you with COMPUTERNAME removed - that way, you'll be able to
          use ${COMPUTERNAME} and it'll just fall back to the environment variable. It'll
          probably be a while 'til we release 0.9, so this is probably your best bet in
          the near term.

          abayer Andrew Bayer added a comment - You can access environment variables that aren't specified explicitly in BuildVariableResolver - I'm thinking we should probably end up just removing COMPUTERNAME from BuildVariableResolver altogether, since that's a Windows-specific variable. If you'd like, I can build a private version of clearcase.hpi for you with COMPUTERNAME removed - that way, you'll be able to use ${COMPUTERNAME} and it'll just fall back to the environment variable. It'll probably be a while 'til we release 0.9, so this is probably your best bet in the near term.
          anb0s anb0s added a comment -

          Thank You for the private build! It works now, please provide a patch...

          anb0s anb0s added a comment - Thank You for the private build! It works now, please provide a patch...

          Code changed in hudson
          User: : abayer
          Path:
          trunk/hudson/plugins/clearcase/src/main/java/hudson/plugins/clearcase/util/BuildVariableResolver.java
          http://fisheye4.cenqua.com/changelog/hudson/?cs=17431
          Log:
          [FIXED JENKINS-3545] Removed COMPUTERNAME from explicit logic - it'll just fall back to environment variables now.

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : abayer Path: trunk/hudson/plugins/clearcase/src/main/java/hudson/plugins/clearcase/util/BuildVariableResolver.java http://fisheye4.cenqua.com/changelog/hudson/?cs=17431 Log: [FIXED JENKINS-3545] Removed COMPUTERNAME from explicit logic - it'll just fall back to environment variables now.
          anb0s anb0s added a comment -

          Thanks!

          anb0s anb0s added a comment - Thanks!

          People

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

            Dates

              Created:
              Updated:
              Resolved: