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

TFS Plugin fails getting sources when Team project name contains spaces

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Critical
    • Resolution: Unresolved
    • Component/s: tfs-plugin
    • Labels:
      None
    • Environment:
      Jenkins ver. 2.89.4 with the tfs plugin 5.126.0
    • Similar Issues:

      Description

       Hi,

      We use Jenkins ver. 2.89.4 with the tfs plugin 5.126.0
      Our TFS team project has a space in its name.
      We cannot change its name in TFS, unfortunately.

      When running a build, Jenkins connects to our TFS server successfully.
      It also recognizes the specific changeset we are querying for.
      However, it retrieves 0 resources and erros out that the Jenkins file is not found.

      The same exact configuration on a project without a space in its name ran successfully.

      Is there a way to configure a project with a whitespace in it?
      Is there another workaround we can follow?

      We tried html encoding the project: $/Space%20Inside
      as well as wrapping the name with double quotes: $/"Space Inside"
      but with no success.

      Thank you,
      Sharon.

        Attachments

          Activity

          Hide
          kelliejos Kellie Jos added a comment -

          Hello Sharon. I'm looking into this issue but have been unable to reproduce it so far.  Could you provide me with some additional information to help me debug the issue?

          It appears you are using a Jenkins Pipelines project, is this correct?

          What version of TFS do you have?

          Can you provide the exact error that you are seeing as well as logs? You can find information on how to capture logs here: 

          https://wiki.jenkins.io/display/JENKINS/Logging

           

          Thanks,

          Kellie

          Show
          kelliejos Kellie Jos added a comment - Hello Sharon. I'm looking into this issue but have been unable to reproduce it so far.  Could you provide me with some additional information to help me debug the issue? It appears you are using a Jenkins Pipelines project, is this correct? What version of TFS do you have? Can you provide the exact error that you are seeing as well as logs? You can find information on how to capture logs here:  https://wiki.jenkins.io/display/JENKINS/Logging .    Thanks, Kellie
          Hide
          tmosleytc Tillman Mosley added a comment -

          TFS Version:  15.112.26307.0

          We receive the same type of error when using the plugin with a TFS Collection that has a space in the name. We run our projects as Jenkins Multi-Branch Pipeline projects. 

          If we create a TFS service hook that fires on "code pushed", it works correctly. The Content is created as application/json and http://jenkinsserver/team-events fires as it should.

          If we create a TFS service hook that fires on "pull request created", it fails. The content is created as application/x-www-form-urlencoded and it tries to fire http://jenkinsserver/team-build but then it notices that we have a space in our collection name.

           

          Status Code: 400
          Reason Phrase: Bad Request
          HTTP Version: 1.1
          Headers:
          {
          Connection: keep-alive
          X-Content-Type-Options: nosniff
          X-Error-Message: Illegal character in path at index 30: http://tfsserver:8080/tfs/Internal Collection/
          Date: Wed, 14 Mar 2018 20:06:31 GMT
          Server: nginx/1.12.2
          Content-Length: 7912
          Content-Type: text/plain; charset=utf-8
          }
          
          
          Show
          tmosleytc Tillman Mosley added a comment - TFS Version:  15.112.26307.0 We receive the same type of error when using the plugin with a TFS Collection that has a space in the name. We run our projects as Jenkins Multi-Branch Pipeline projects.  If we create a TFS service hook that fires on "code pushed", it works correctly. The Content is created as application/json and http://jenkinsserver/team-events  fires as it should. If we create a TFS service hook that fires on "pull request created", it fails. The content is created as application/x-www-form-urlencoded and it tries to fire http://jenkinsserver/team-build  but then it notices that we have a space in our collection name.   Status Code: 400 Reason Phrase: Bad Request HTTP Version: 1.1 Headers: { Connection: keep-alive X-Content-Type-Options: nosniff X-Error-Message: Illegal character in path at index 30: http: //tfsserver:8080/tfs/Internal Collection/ Date: Wed, 14 Mar 2018 20:06:31 GMT Server: nginx/1.12.2 Content-Length: 7912 Content-Type: text/plain; charset=utf-8 }

            People

            • Assignee:
              redsolo redsolo
              Reporter:
              sharonjenkins Sharon George
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: