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

Unable to use ${NODE_NAME} as a Workspace name

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: p4-plugin
    • Labels:
      None
    • Similar Issues:

      Description

      When trying to use ${NODE_NAME} as a value for the workspace name in a Static workspace behavior environment, and running the job the following error will output from the job:

      17:15:16 Building remotely on build117 in workspace c:\trees
      17:15:18 Unable to setup workspace: java.lang.Exception: Undefined workspace: ${NODE_NAME}

      We used this functionality with the other Perforce Plugin as we generally do not lock our jobs to specific machines. We would like to see this behavior exist with the new plugin as well.

        Attachments

          Issue Links

            Activity

            Hide
            p4paul Paul Allen added a comment -

            I'm still looking into the best implementation for this issue.

            Currently I only support ${...} formatters for template and streams workspaces, but I can understand why you need them for static workspaces.

            That part of change is fairly simple, but I am trying to understand how to access environment vars. I have been experimenting with Parameters builds vars and environment vars, but not sure about their visibility outside of a build (e.g. SCM polling).

            Show
            p4paul Paul Allen added a comment - I'm still looking into the best implementation for this issue. Currently I only support ${...} formatters for template and streams workspaces, but I can understand why you need them for static workspaces. That part of change is fairly simple, but I am trying to understand how to access environment vars. I have been experimenting with Parameters builds vars and environment vars, but not sure about their visibility outside of a build (e.g. SCM polling).
            Hide
            rhummer Ryan Hummer added a comment -

            Cool, thanks!

            Also a kind of related question. With the other P4 Plugin it has a field for specifying the syntrax for slave agents. We do a lot of Matrix jobs where that field comes into play. I see templates & streams have something like that. Will Static workspaces have something similar? Or should I file a request?

            Thanks!

            Show
            rhummer Ryan Hummer added a comment - Cool, thanks! Also a kind of related question. With the other P4 Plugin it has a field for specifying the syntrax for slave agents. We do a lot of Matrix jobs where that field comes into play. I see templates & streams have something like that. Will Static workspaces have something similar? Or should I file a request? Thanks!
            Hide
            p4paul Paul Allen added a comment -

            The latest 1.0.6 release should allow access to the NODE_NAME parameter. I also extended the other workspaces to accept the formatting parameters.

            Show
            p4paul Paul Allen added a comment - The latest 1.0.6 release should allow access to the NODE_NAME parameter. I also extended the other workspaces to accept the formatting parameters.
            Hide
            p4paul Paul Allen added a comment -

            Fixed in 1.0.6

            Show
            p4paul Paul Allen added a comment - Fixed in 1.0.6
            Hide
            rhummer Ryan Hummer added a comment -

            Works great, thank you!

            Show
            rhummer Ryan Hummer added a comment - Works great, thank you!

              People

              • Assignee:
                p4paul Paul Allen
                Reporter:
                rhummer Ryan Hummer
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: