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

Metadata String Type not parsed properly by TFVC

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: tfs-plugin
    • Labels:
      None
    • Environment:
      Jenkins LTS 2.73.3
      RHEL 6.7
      tfs-plugin:5.126.0
      metadata:1.1.0b
    • Similar Issues:

      Description

      Declaring a variable using metadata plugin fails to resolve value for project path.

      Add metadata plugin,

      set Meta Data Values Type: String. Name:BR, value=scm_demo

      [ X ] Expose to environment

      Post Build Task - Create a TFVC label

      set Label ${MD_BR}

       TFVC Project path:

      works:$/BT/ITSuppt/sampleApplication/scm_demo

      fails: $/BT/ITSuppt/sampleApplication/${MD_BR}

      works for "Create TFVC label"

      SUCCESS (Project Path = $/path/to/sampleApplication/scm_demo):
      ========
      Querying for remote changeset at '$/path/to/sampleApplication/scm_demo' as of 'D2017-12-08T02:54:09Z'...
      Query result is: Changeset #185676 by 'dev1' on '2017-10-20T23:07:36Z'.
      Checking if there exists a mapping for /data/jenkins/workspace/ITSuppt/TFS_Label_Test...no.
      Creating workspace 'Hudson-TFS_Label_Test-MASTER' owned by 'tfbuilder1'...
      Mapping '$/path/to/sampleApplication/scm_demo' to local folder '/data/jenkins/workspace/ITSuppt/TFS_Label_Test' in workspace 'Hudson-TFS_Label_Test-MASTER'...
      Created workspace 'Hudson-TFS_Label_Test-MASTER'.
      Getting version 'C185676' to '/data/jenkins/workspace/ITSuppt/TFS_Label_Test'...
      Finished getting version 'C185676'. Retrieved 335 resources.
      Creating label 'scm_demo' on '$/path/to/sampleApplication/scm_demo' as of the current version in workspace 'Hudson-TFS_Label_Test-MASTER'...
      Created label 'scm_demo'.

      FAILURE (Project Path = $/path/to/sampleApplication/${MD_BR}):
      ========
      Querying for remote changeset at '$/path/to/sampleApplication/${MD_BR}' as of 'D2017-12-08T02:53:51Z'...
      FATAL: com.microsoft.tfs.core.exceptions.TECoreException: TF10122: The path '$/path/to/sampleApplication/${MD_BR}' contains a '$' at the beginning of a path component. Remove the '$' and try again.
      com.microsoft.tfs.core.ws.runtime.exceptions.SOAPFault: TF10122: The path '$/path/to/sampleApplication/${MD_BR}' contains a '$' at the beginning of a path component. Remove the '$' and try again.
          at com.microsoft.tfs.core.ws.runtime.client.SOAP12Service.examineResponseDOMForFault(SOAP12Service.java:117)
          at com.microsoft.tfs.core.ws.runtime.client.SOAPService.examineBodyForFault(SOAPService.java:987)
          at com.microsoft.tfs.core.ws.runtime.client.SOAPService.executeSOAPRequestInternal(SOAPService.java:665)
          at com.microsoft.tfs.core.ws.runtime.client.SOAPService.executeSOAPRequest(SOAPService.java:444)
          at ms.tfs.versioncontrol.clientservices._03._RepositorySoap12Service.queryHistory(_RepositorySoap12Service.java:1503)
          at com.microsoft.tfs.core.clients.versioncontrol.internal.WebServiceLayer.queryHistory(WebServiceLayer.java:1573)
      Caused: com.microsoft.tfs.core.exceptions.TECoreException: TF10122: The path '$/path/to/sampleApplication/${MD_BR}' contains a '$' at the beginning of a path component. Remove the '$' and try again.
          at com.microsoft.tfs.core.exceptions.mappers.TECoreExceptionMapper.map(TECoreExceptionMapper.java:92)
          at com.microsoft.tfs.core.exceptions.mappers.VersionControlExceptionMapper.map(VersionControlExceptionMapper.java:43)
          at com.microsoft.tfs.core.clients.versioncontrol.internal.WebServiceLayer.queryHistory(WebServiceLayer.java:1589)
          at com.microsoft.tfs.core.clients.versioncontrol.internal.WebServiceLayerLocalWorkspaces.queryHistory(WebServiceLayerLocalWorkspaces.java:1254)
          at com.microsoft.tfs.core.clients.versioncontrol.VersionControlClient.queryHistory(VersionControlClient.java:4264)
          at hudson.plugins.tfs.model.MockableVersionControlClient.queryHistory(MockableVersionControlClient.java:255)
          at hudson.plugins.tfs.commands.RemoteChangesetVersionCommand.call(RemoteChangesetVersionCommand.java:66)
          at hudson.plugins.tfs.commands.RemoteChangesetVersionCommand.call(RemoteChangesetVersionCommand.java:34)
          at hudson.remoting.LocalChannel.call(LocalChannel.java:45)
          at hudson.plugins.tfs.model.Server.execute(Server.java:233)
      Caused: java.lang.RuntimeException
          at hudson.plugins.tfs.model.Server.execute(Server.java:237)
          at hudson.plugins.tfs.model.Project.extractChangesetNumber(Project.java:280)
          at hudson.plugins.tfs.model.Project.getRemoteChangesetVersion(Project.java:276)
          at hudson.plugins.tfs.model.Project.getRemoteChangesetVersion(Project.java:292)
          at hudson.plugins.tfs.TeamFoundationServerScm.recordWorkspaceChangesetVersion(TeamFoundationServerScm.java:394)
          at hudson.plugins.tfs.TeamFoundationServerScm.checkout(TeamFoundationServerScm.java:343)
          at hudson.scm.SCM.checkout(SCM.java:495)
          at hudson.model.AbstractProject.checkout(AbstractProject.java:1212)
          at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:566)
          at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
          at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:491)
          at hudson.model.Run.execute(Run.java:1737)
          at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
          at hudson.model.ResourceController.execute(ResourceController.java:97)
          at hudson.model.Executor.run(Executor.java:421)

       

        Attachments

          Issue Links

            Activity

            Hide
            kelliejos Kellie Jos added a comment -

            Ian, thanks for using the tfs-plugin! we were able to reproduce your issue and have added it to our backlog.  We will investigate it soon.

            Show
            kelliejos Kellie Jos added a comment - Ian, thanks for using the tfs-plugin! we were able to reproduce your issue and have added it to our backlog.  We will investigate it soon.

              People

              • Assignee:
                redsolo redsolo
                Reporter:
                ianw Ian Williams
              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: