Skip to end of metadata
Go to start of metadata

Summary

This plugin integrates Jenkins with Visual Studio Team Foundation Server (TFS) and Visual Studio Team Services (VSTS). Both Git and Team Foundation Version Control (TFVC) are supported.

Plugin Information

View Team Foundation Server on the plugin site for more information.

Content moved

The rest of the content was moved to the GitHub repository, mostly in the README.md file.

59 Comments

  1. Unknown User (teamashbaugh@gmail.com)

    There appears to be an issue on the Changes page for a given changeset "Version" link. (big grin)

    Example:

    Currently the URL is set to somthing like: http://<someserver>:8090/UI/Pages/Scc/cs.aspx?cs=70239

    However, TFS 2008 requires: http://<someserver>:8090/UI/Pages/Scc/ViewChangeset.aspx?changeset=70239

    Note: My Build Repositiry browser is set to "Team System Web Access" and Example URL to change set page: "http://<someserver>:8090/UI/Pages/Scc/"

    I have changed as many settings as I can find in hudson - it looks like the ".aspx" URL is listing the wrong page name for TFS2008

    It would be nice to just append the id's of a given changeset in the TFS plugin code and let the URL be completely configured in hudson.

    For Example:

    URL - http://<someserver>:8090/UI/Pages/Scc/ViewChangeset.aspx?changeset=

    Then append the changeset id for any links on the changes page in hudson.

    1. Unknown User (bogdan.iosif@gmail.com)

      Raised an issue for this problem. See http://issues.jenkins-ci.org/browse/JENKINS-7394

      While your observation, diagnostic and description are all pretty good, please use the issue tracker in the future to signal this kind of problems because in this way there is a much better chance to see it solved and you will be able to better track the problem and get notified as soon as a solution is found.

  2. Unknown User (misterionkell@gmail.com)

    +1 to Joe Mash issue.

    Also have a trouble with locale encoding. We have non latin (russian, win1251) comments in tfs checkins, so "changelist" in hudson show abracadabra instead of russian letters.

  3. Unknown User (kbeal@crosscountry-auto.com)

    Hi,

    In version 1.8, several fixes were made to clean up workspaces when things changed. We just ran into an issue after changing the username which accesses the TFS box (we were using an employee's credentials, and changed it to an account created for the build team). This caused builds to fail with the error (details hidden in angle brackets):

    The working folder C:\WINDOWS\system32\config\systemprofile\.hudson\jobs\<JOBNAME>\workspace is already in use by the workspace <JOBNAME>;<USERNAME> on computer <COMPUTERNAME>.

    In order to get the builds to work again, we had to first put the old user back; then wipe out the workspace; then configure the new user. Now it builds correctly.

    The key to getting this to work was seeing the description of the fixes that went into 1.8, so thanks for having that up here!

    Would it be possible to fix it so that, whenever the user defined for a job is changed, that job's workspace is wiped out similarly, so nobody else will get the "already in use" error above?

    Thanks,
    Ken

  4. Unknown User (kbeal@crosscountry-auto.com)

    Hi,

    Our build environment requires supporting tags.  Any idea when this will be completed?  (It's in the road map for "1.x", but does not have a date or a ticket number associated with it.)

    Thanks,
    Ken

  5. Hi,

    I see this page reflects the new version 1.12 which fixes the "unparseable date" issue, which we've eagerly been awaiting. However, the latest download still points to the 1.11 version.

    Thanks,
    Ken

  6. hi 

    I want add more  Project path  in a job  ,  to fix the problem  of reference,   how can i do ?

    why the Team Foundation Server plugin do not have the Button like " add more locations "  

    the SVN plugin have this function.  

  7. Hi,

    How do we include and/or exclude regions to monitor SCM in TFS also do not see option "Add more locations" button. Say for e.g.: $/ProjectA/source/ under source I want to monitor two or more paths for SCM Change.

  8. Hi,

    I need to change the plugin for an especific integration. I've downloaded sources code and build an project from Eclipse.

    I put the tfs directory and tfs.hpi in plugin directory of Jenkins and at first I thought everything was ok, but wasn't. The method pollChanges is never called. The only method have been called is checkout.

    So, every build is calling checkout method, even whitout anychange in source code in TFS.

    In my understading, the checkout method should be called only if poolChanges returns true, is it right ? Does somebody know what's the possible problema ? Why poolChanges have never been called ?

    Thanks

  9. Hi,

    There appears to be a defect, that if something causes a build (for instance, someone clicks 'build now') other than TFS polling, the TFS_CHANGESET property remains the same.  Since I don't have 'update selected' and it gets new code for the polling directory, I need that new changeset number, so I can accurately get the right version of code in other locations.

    Thanks

  10. Unknown User (metalmasakar)

    hi.

    Do not bug been fixed 

  11. I've been getting this working on centos

    1. http://msdn.microsoft.com/en-us/library/hh301122.aspx#InstallCLC

    2. Download the command line tool and make tf executable (chmod +x tf), also put the location into it's your bashrc PATH=/location/tf

    3. sudo su jenkins and accept the licence agrement ."/tf eula -accept"

    4. This will mean that you can now use TFS from centos should work for all unix/linux debian etc, etc

  12. Hello, 

    In our environment, we have a few projects that are coded in C/C++ and require that we build on both the Windows and Linux platforms.  

    I thought that I could use the Master/Slave concept by using Windows as the Master and Linux as the slave.  However, when I attempted to configure Jenkins in this way, I found that I couldn't change the path to TFS for each of the environments.  I could set the path to the other tools that are used but not for TFS.  It appears that this isn't configurable for those environments that may differs. 

    My first thought was that perhaps I configured something incorrectly.  Perhaps there is another method that I fail to see at this point in time. The problem that I encountered was that when the slave tried to pull the source from TFS, it was looking in the master's (windows) install path for the TFS.exe.  On Linux, it couldn't use this path because it was unaware of the windows environment. I installed the CLC on the Linux machine in hopes that I could configure the slave to use this path.  It appeared to me that this wasn't something that I could change.  After installing CLC on the Linux system, this allows me to pull using TFS if I install Jenkins as a master but not as a slave (Linux).  Now the problem is how do I get the 2 masters to communicate. I have a workaround for this also.  It would be nice to not have a workaround. 

    I googled configuration options but I didn't find anything that would work. I had to move on and set up 2 separate jenkins masters which isn't ideal but it is working for now.  One on Windows and One on Linux that only builds the projects that we currently have to build Linux specific.

    Any suggestions or help would be greatly accepted. 

    1. We do the same thing and we've just made it so that on the Master (Linux) and the Slave (windows) when you run tf from either they will both access tfs. When we want to run specific to Linux we just set the label to master and the name of the windows labels.

  13. Has anyone found a way to connect to the Team Foundation Service/TFS Preview? With a live-id that is.

    1. Martin,

      Have you had any luck with this? I found a tool called TFS Service Credential Viewer. Blog here: http://blog.hinshelwood.com/tfs-service-credential-viewer/

      It lets you log into TFS with your Live account and then retrieve service account credentials that you can use from your build system. I have not, however, been able to get it to work with Jenkins. I keep getting told that my user is not authorized. I figure mutliple people working on this may yield better results, so if you have a breakthrough, please post here.

  14. Has anyone had this issue in Linux with the TFS plugin?  Maven releases are failing with:13:45:28 INFO Verifying that there are no local modifications...
    13:45:28 INFO ignoring changes on: pom.xml.next, release.properties, pom.xml.releaseBackup, pom.xml.backup, pom.xml.branch, pom.xml.tag
    13:45:28 INFO scmUrl - http://waliatfsc.mycompany.com:8080/tfs/2x::$/2xGraphics/Stage/2xGraphics/2xGraphics
    13:45:28 INFO Scheme - http
    13:45:28 INFO Command line - /bin/sh -c cd /var/lib/jenkins/jobs/Stage-2xGraphics/workspace && tf status /login:abcd\tfs2xbuildservice,12345 -recursive -format:detailed '$/2xGraphics/Stage/2xGraphics/2xGraphics'
    13:45:28 INFO err - /bin/sh: tf: command not found
    13:45:28
    13:45:28 mojoFailed org.apache.maven.plugins:maven-release-plugin:2.1(default-cli)
    13:45:30 projectFailed com.kenexa:2xGraphics:3.4-stage-23-SNAPSHOT
    13:45:30 projectSkipped com.kenexa:2xGraphics:3.4-stage-23-SNAPSHOT
    13:45:30 INFO
    13:45:30 INFO ------------------------------------------------------------------------
    13:45:30 INFO Skipping 2xGraphics
    13:45:30 INFO This project has been banned from the build due to previous failures.
    13:45:30 INFO ------------------------------------------------------------------------
    13:45:30 sessionEnded
    13:45:30 INFO ------------------------------------------------------------------------
    13:45:30 INFO BUILD FAILURE
    13:45:30 INFO ------------------------------------------------------------------------
    13:45:30 INFO Total time: 4.293s
    13:45:30 INFO Finished at: Wed Jan 02 13:45:30 EST 2013
    13:45:30 INFO Final Memory: 8M/490M
    13:45:30 INFO ------------------------------------------------------------------------
    13:45:30 Projects to build: MavenProject: com.kenexa:2xGraphics:3.4-stage-23-SNAPSHOT @/var/lib/jenkins/jobs/Stage-2xGraphics/workspace/pom.xml
    13:45:30 JENKINS Archiving /var/lib/jenkins/jobs/Stage-2xGraphics/workspace/pom.xml to /var/lib/jenkins/jobs/Stage-2xGraphics/modules/com.kenexa$2xGraphics/builds/2013-01-02_13-45-23/archive/com.kenexa/2xGraphics/3.4-stage-23-SNAPSHOT/2xGraphics-3.4-stage-23-SNAPSHOT.pom
    13:45:31 Waiting for Jenkins to finish collecting data
    13:45:31 mavenExecutionResult exceptions not empty
    13:45:31 message : Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.1:prepare (default-cli) on project 2xGraphics: Unable to check for local modifications
    13:45:31 Provider message:
    13:45:31 Error code for TFS status command - 127
    13:45:31 Command output:
    13:45:31 /bin/sh: tf: command not found
    13:45:31
    13:45:31 cause : Unable to check for local modifications
    13:45:31 Provider message:
    13:45:31 Error code for TFS status command - 127
    13:45:31 Command output:
    13:45:31 /bin/sh: tf: command not found
    13:45:31
    13:45:31 Stack trace :
    13:45:31 org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.1:prepare (default-cli) on project 2xGraphics: Unable to check for local modifications
    13:45:31 Provider message:
    13:45:31 Error code for TFS status command - 127
    13:45:31 Command output:
    13:45:31 /bin/sh: tf: command not found

  15. There really is an issue with master/slave configurations.

    For instance, in my situation, I have a linux master and a service-slave on a windows box, the windows box has the tfs client as well as a path that includes the tf.exe directory,  on the windows box, I can open a command line anywhere, call tf and it resolves without issue, but if I configure in the general configurations of the master (linux box) to search for tf or tf.exe, which the little help option says will allow the slave to locate the tf exe from path, if I attempt to run a job on the windows slave, I get the following:

    java.io.IOException: Cannot run program "tf.exe" (in directory "c:\Jenkins\workspace\Build"): CreateProcess error=2, The system cannot find the file specified

    The only way of having the build work on the slave is to configure the exact path to tf as it appears on the slave in my master.  That results in a red warning text saying that it cannot find that in the linux PATH, which is normal because it is a windows path....

    I think that this problem can be resolved in 1 of two ways:

    1: fix the usage of path when tf (not including the path) is specified in the main configuration.  This allows each slave to have his own defined path that allows resolution of tf.

    2: instead, allow to configure/override the master configured path under the node section, this way we can specify the full path to tf.exe for each node which would also solve our issue.

    Is there any chance of this getting fixed???

    thanks.

  16. Hi,
    Do you have a plan to add TFS 2012 support? It has different format of URLs so links for changesets don't work.

    1. JENKINS-16207 makes it look easy enough. If that issue describes what you want, please go vote for it, otherwise create another one.

      I'm currently only adding features and fixing defects for things I needed yesterday, but once that's done, I can go through the backlog and see what's most important/sought after.

  17. How do you use 'Add support for polling without needing a workspace?'  I upgraded to 2.0 and to the best that I can tell, nothing is different.

    1. It's always active; the code for polling used to need a workspace present and then would use a TF command that compared what was on the server to what was in the workspace. Since the TFS plugin now records which changeset the last build was built against, the polling consists of using a TF command to ask for any changesets since the last recorded one, which does not require a workspace. See line 192 in the diff for the code version of what I just wrote, plus the other changes in pull request #14 for more details.

      One way you would be able to tell that something is different is the TF executable will now be invoked for polling on the master instead of on the agent(s), since a workspace is no longer required for polling.

      Another way to see the difference: downgrade to 1.20 and turn off all your agents with tied TFS jobs. Version 1.20 and below would, at the next polling interval, automatically cause a build of those tied jobs to be queued because no workspace was available to poll with. (It's something we noticed when rebooting agents after, say, installing operating system updates)

      HTH,
      Oli

      1. Okay, so this is CLOSER to what I really want, but not it.  What I really want is to not need to download source at all, and still be able to leverage polling on a TFS folder.

        1. If I understand you correctly, you are saying you want to write a job that is triggered whenever something changes in TFS, but will not perform a GET when that happens. Is that what you mean? Either way, can you give more details about what you're trying to do?

          1. The simplest example I have invovles git-tf or git-tfs.  Right now I have a job that runs every few minutes that fetches down the latest changeset.  But it would be nice if I could poll for updates, and only run the job when I KNOW there is a changeset to fetch.  Then I don't have hundreds of jenkins jobs that did no actual work, obfuscating the ones that are relevant.  Does that help?

            1. Ah, yes, I see what you're trying to do now. I have two options to recommend you:

              1. Cloak subfolders
              2. Use TFS jobs to trigger Jenkins jobs

              Cloak subfolders

              In your Jenkins job that monitors TFS:

              1. Set the "Use update" checkbox to checked, which will only create a workspace (per agent) once.
              2. Tie the job to the master or a specific agent to simplify matters.
              3. Cloak all subfolders in that workspace. On the tied agent:
                1. Navigate to the workspace folder
                2. Run tf workfold -cloak with the appropriate options
                3. Repeat until all sub-folders are cloaked
                  The polling by the TFS plugin will only trigger a job run when there are changes since the last time and, when it does run the job, the "Get" will do almost nothing since everything is cloaked.

              Use TFS jobs to trigger Jenkins jobs

              This won't use the Jenkins TFS plugin at all. Using Visual Studio, create a Build Definition that will:

              1. Trigger using Continuous Integration (or Rolling Builds if you don't want to trigger on every check-in)
              2. Monitor the folder you're interested in (cloak sub-folders here, too, to speed up the "Get")
              3. Execute an MSBuild script that queues a Jenkins build:
                1. In Projects to Build, point to a .msbuild file that's in source control (instead of a solution file)
                2. In the .msbuild file, trigger an HTTP POST to your Jenkins server for the job that needs to be notified of check-ins. For example: http://server/job/ConvertTfsToGit/build

              Let me know how that works out for you.

  18. On Jenkins 1.536, after upgrading from 1.20 to 3.0, this happens midway through the GET process when I build anything:

    Getting <filename>
    FATAL: com.microsoft.tfs.jni.internal.platformmisc.NativePlatformMisc.nativeGetEnvironmentVariable(Ljava/lang/String;)Ljava/lang/String;
    java.lang.UnsatisfiedLinkError: com.microsoft.tfs.jni.internal.platformmisc.NativePlatformMisc.nativeGetEnvironmentVariable(Ljava/lang/String;)Ljava/lang/String;
    at com.microsoft.tfs.jni.internal.platformmisc.NativePlatformMisc.nativeGetEnvironmentVariable(Native Method)
    at com.microsoft.tfs.jni.internal.platformmisc.NativePlatformMisc.getEnvironmentVariable(NativePlatformMisc.java:134)
    at com.microsoft.tfs.jni.PlatformMiscUtils.getEnvironmentVariable(PlatformMiscUtils.java:52)
    at com.microsoft.tfs.core.config.httpclient.DefaultHTTPClientFactory.shouldAcceptUntrustedCertificates(DefaultHTTPClientFactory.java:288)
    at com.microsoft.tfs.core.config.httpclient.DefaultHTTPClientFactory.configureClientParams(DefaultHTTPClientFactory.java:324)
    at com.microsoft.tfs.core.config.httpclient.DefaultHTTPClientFactory.newHTTPClient(DefaultHTTPClientFactory.java:137)
    at com.microsoft.tfs.core.TFSConnection.getHTTPClient(TFSConnection.java:1041)
    at com.microsoft.tfs.core.TFSConnection.getWebService(TFSConnection.java:840)
    at com.microsoft.tfs.core.clients.registration.RegistrationClient.<init>(RegistrationClient.java:123)
    at com.microsoft.tfs.core.clients.registration.RegistrationClient.<init>(RegistrationClient.java:97)
    at com.microsoft.tfs.core.config.client.DefaultClientFactory$4.newClient(DefaultClientFactory.java:180)
    at com.microsoft.tfs.core.config.client.DefaultClientFactory.newClient(DefaultClientFactory.java:91)
    at com.microsoft.tfs.core.TFSConnection.getClient(TFSConnection.java:1470)
    at com.microsoft.tfs.core.TFSTeamProjectCollection.getRegistrationClient(TFSTeamProjectCollection.java:348)
    at com.microsoft.tfs.core.clients.webservices.IdentityManagementService.<init>(IdentityManagementService.java:64)
    at hudson.plugins.tfs.model.Project.getDetailedHistory(Project.java:78)
    at hudson.plugins.tfs.actions.CheckoutAction.checkout(CheckoutAction.java:56)
    at hudson.plugins.tfs.TeamFoundationServerScm.checkout(TeamFoundationServerScm.java:176)
    at hudson.model.AbstractProject.checkout(AbstractProject.java:1411)
    at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:652)
    at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:557)
    at hudson.model.Run.execute(Run.java:1665)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
    at hudson.model.ResourceController.execute(ResourceController.java:88)
    at hudson.model.Executor.run(Executor.java:230)

    I'm on Windows...does this mean my TFS client or Java version are out of date or something? Backing down to 1.2.0 fixed it and I don't need any 3.x features at this time, but I'd love to know if there's a way to fix this.

    -Jesse

    1. Thanks for reporting this and I apologize for the inconvenience.

      Can you let me know anything else about your environment? For example, what version of Windows and Java are you running? Is Java configured with any security restrictions? Are you running under a servlet container? Do you use Jenkins slaves on other operating systems?

      A lot of the information I request can be found in Jenkins' System Properties page, at http://example.com:8080/systemInfo Can you copy-paste the values for the following rows?

      • com.microsoft.tfs.jni.native.base-directory
      • java.home
      • java.runtime.version
      • JENKINS_HOME

      Thanks!

      1. jenkins.xlsx

        Attached is a dump of my config. Removed some corporate-specific vars and usernames but everything else is legit. If there's a better format than an xlsx let me know.

        Jenkisn is running on Windows 7 Enterprise. Java isn't configured with any restrictions that I know of. The machine has Java 1.6.x. Jenkins is running in whatever container the default Windows installer on their site runs it in. No slaves, just this one instance.

    2. This was a defect with a Jenkins folder containing spaces that was resolved in version 3.0.1.

  19. Hi, when I update to version 3.0.1 I have the following error :

    FATAL: file must not be null
    java.lang.NullPointerException: file must not be null
    	at com.microsoft.tfs.util.Check.throwForNull(Check.java:135)
    	at com.microsoft.tfs.util.Check.notNull(Check.java:28)
    	at com.microsoft.tfs.core.clients.versioncontrol.workspacecache.internal.InternalCacheLoader.loadConfig(InternalCacheLoader.java:89)
    	at com.microsoft.tfs.core.clients.versioncontrol.Workstation.<init>(Workstation.java:150)
    	at com.microsoft.tfs.core.clients.versioncontrol.Workstation.getCurrent(Workstation.java:206)
    	at com.microsoft.tfs.core.clients.versioncontrol.VersionControlClient.<init>(VersionControlClient.java:450)
    	at com.microsoft.tfs.core.clients.versioncontrol.VersionControlClient.<init>(VersionControlClient.java:520)
    	at com.microsoft.tfs.core.config.client.DefaultClientFactory$7.newClient(DefaultClientFactory.java:238)
    	at com.microsoft.tfs.core.config.client.DefaultClientFactory.newClient(DefaultClientFactory.java:91)
    	at com.microsoft.tfs.core.TFSConnection.getClient(TFSConnection.java:1470)
    	at com.microsoft.tfs.core.TFSTeamProjectCollection.getVersionControlClient(TFSTeamProjectCollection.java:359)
    	at hudson.plugins.tfs.model.Project.getDetailedHistory(Project.java:80)
    	at hudson.plugins.tfs.actions.CheckoutAction.checkout(CheckoutAction.java:56)
    	at hudson.plugins.tfs.TeamFoundationServerScm.checkout(TeamFoundationServerScm.java:176)
    	at hudson.model.AbstractProject.checkout(AbstractProject.java:1412)
    	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:652)
    	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
    	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:557)
    	at hudson.model.Run.execute(Run.java:1679)
    	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
    	at hudson.model.ResourceController.execute(ResourceController.java:88)
    	at hudson.model.Executor.run(Executor.java:230)
    

    All is working fine when I go back to version 2.0.
    I use Jenkins 1.538, tomcat 7, java 1.6.0_27

    1. Thanks for reporting this and I apologize for the inconvenience.

      What version of TFS are you running? I only tested with TFS 2012.

      Can you let me know anything else about your environment? For example, what's the operating system Jenkins is running under (it sounds like Windows)? Is Java configured with any security restrictions? Do you use Jenkins slaves on other operating systems? If so, is this happening when a job executes on the master or on a slave?

      Thanks!

      1. We are using TFS 2012. Our build architecture is as follow:

         - a master which runs on a linux server (Ubuntu 12.04), running Jenkins 1.538 with tomcat 7,

         - Mac OS X slave with Mac OS X Mountains Lions and Java 1.6.0_51 (I don't know if it runs with security restriction :-/)

        1. I had a hunch and searched online for part of the stack trace. I found NullPointerException when attempting to connect to TFS server.

          Can you look for the file .microsoft/Team Foundation/4.0/Cache/VersionControl.config under the $HOME folder of the user Jenkins runs as, on both machines? It should be valid XML and I suspect it might be a bunch of NULLs.

          Thanks!

          1. SOLVED

            I have a very similar setup (master Jenkins on FreeBSD via Tomcat, Windows slave).  Here's the situation.

            Tomcat runs as user "www" (or "nobody"), however the server process is started as root (so it can bind port 80, etc) before it calls setuid() to run as user www.  The $HOME directory environment variable however, is not changed so it remains root's home directory (/root on FreeBSD) and not www's.  Which is good...because www's home directory is /nonexistent which as the name suggests doesn't actually exist and we don't want it to.

            But of course, the www user doesn't have permission to create /root/.microsoft.  The solution then, is to create /root/.microsoft and chown it to your tomcat7 user (in my case "www", it's "nobody" on most Linux I believe) and set rwx:

            mkdir /root/.microsoft

            chown www:www /root/.microsoft

            chmod 755 /root/.microsoft

            No such kludges were needed on the (Windows) slave machine, only the master (Unix).

            I've no idea why TFS needs this directory... It already has $tf to store anything it could possibly need and this kind of shenanigans just makes TFS a PITA to use on build servers in general.  :-P

  20. Hi,

    I want to know if it's possible to configure this plugin for TFS 2010 with Collections.

    Thanks in advance

  21. Hi,

    My builds started mysteriously failing on Monday this week with first one issue, now a second.  I've been hacking at it for a while and found that the workspace is now being created with a root mapping into TFS, and then a mapping is added for the project I specified in the Jenkins setup after the initial workspace creation.  Now when I try to do a build, it tries to use that default mapping which is trying to pull down 4GB worth of code across 10 or so projects we have in source control, rather than the one I specified in the jenkins setup.  My workaround is to run the CI once, go into Visual Studio and remove the root mapping, run it again, and the get executes fine.  Is there a config issue that could cause this?  Nothing that anyone has owned up to on our project has changed in our CI or NI builds, so maybe this "root workspace" thing was always being created but wasn't a problem before- a bit mystfied on this.  I've contacted our server folks to make sure that no maintenance or patching was done on the server over the weekend, and none has.

    Now, after the get completes, I get the following stacktrace:

    Started by user anonymous
    
    Building in workspace workspace\CI-DOHARE
    
    [CI-DOHARE] $ "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\TF.exe" workspaces -format:brief -server: http://<tfsserver>:8080/tfs
    
     ********
    
    Collection: http://<tfsserver>:8080/tfs
    
    Workspace                Owner      Computer      Comment
    
    ----------------------- -------- ----------- ----------------------------
    
    Jenkins-CI-DOHARE-MASTER Dan.O'Hare <Jenkins Server> 
    
    [CI-DOHARE] $ "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\TF.exe" get . -recursive -version:D2013-12-27T15:52:55Z -noprompt ********
    
    All files are up to date.
    
    FATAL: The server <tfsserver> failed to respond
    
    com.microsoft.tfs.core.exceptions.TECoreException: The server <tfsserver> failed to respond
    
    at com.microsoft.tfs.core.exceptions.mappers.TECoreExceptionMapper.map(TECoreExceptionMapper.java:99)
    
    at com.microsoft.tfs.core.exceptions.mappers.RegistrationExceptionMapper.map(RegistrationExceptionMapper.java:23)
    
    at com.microsoft.tfs.core.clients.registration.RegistrationData.newFromServer(RegistrationData.java:70)
    
    at com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationData(RegistrationClient.java:645)
    
    at com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationEntry(RegistrationClient.java:188)
    
    at com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationEntry(RegistrationClient.java:167)
    
    at com.microsoft.tfs.core.clients.webservices.IdentityManagementService.<init>(IdentityManagementService.java:65)
    
    at hudson.plugins.tfs.model.Project.getDetailedHistory(Project.java:78)
    
    at hudson.plugins.tfs.actions.CheckoutAction.checkout(CheckoutAction.java:56)
    
    at hudson.plugins.tfs.TeamFoundationServerScm.checkout(TeamFoundationServerScm.java:176)
    
    at hudson.model.AbstractProject.checkout(AbstractProject.java:1411)
    
    at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:652)
    
    at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
    
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:557)
    
    at hudson.model.Run.execute(Run.java:1665)
    
    at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:509)
    
    at hudson.model.ResourceController.execute(ResourceController.java:88)
    
    at hudson.model.Executor.run(Executor.java:230)
    
    Caused by: com.microsoft.tfs.core.ws.runtime.exceptions.TransportException: The server un-s-dvtfs-11.dev.trizetto.com failed to respond
    
    at com.microsoft.tfs.core.ws.runtime.client.SOAPService.executeSOAPRequestInternal(SOAPService.java:744)
    
    at com.microsoft.tfs.core.ws.runtime.client.SOAPService.executeSOAPRequest(SOAPService.java:473)
    
    at ms.tfs.services.registration._03._RegistrationSoap12Service.getRegistrationEntries(_RegistrationSoap12Service.java:105)
    
    at com.microsoft.tfs.core.clients.registration.RegistrationData.newFromServer(RegistrationData.java:65)
    
    ... 15 more
    
    Caused by: com.microsoft.tfs.core.httpclient.NoHttpResponseException: The server un-s-dvtfs-11.dev.trizetto.com failed to respond
    
    at com.microsoft.tfs.core.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:2358)
    
    at com.microsoft.tfs.core.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:2065)
    
    at com.microsoft.tfs.core.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1315)
    
    at com.microsoft.tfs.core.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:508)
    
    at com.microsoft.tfs.core.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:197)
    
    at com.microsoft.tfs.core.httpclient.HttpClient.executeMethod(HttpClient.java:464)
    
    at com.microsoft.tfs.core.httpclient.HttpClient.executeMethod(HttpClient.java:376)
    
    at com.microsoft.tfs.core.ws.runtime.client.SOAPService.executeSOAPRequestInternal(SOAPService.java:588)
    
    ... 18 more
    

    I've spent 2.5 days on this so far (so much for bench time over the holidays, eh?) and would really welcome any input.  

    Also- I see TRACE statements in the plugin code, how do we enable log4j to TRACE log to a file?  I am running as a service, so the console appender is useless.  I've added a file appender to the log4j.properties in the war file to no avail.

    Thanks in advance,

    Dan O.

    1. Dan,

      Have you found a solution yet?  My network administrators say that the firewall was preventing my jenkins machine from completing requests to the TFS server.  I was wondering if anyone had a list of ports that jenkins requires to communicate with TFS.

      Anybody have this insight?

      Jonathan

      1. Hi Jonathan,

        My issue was caused because I'd changed my personal network password which was being used in that Jenkins project (it started of as a prototype, so using my own credentials was the fastest way to get it up and running).  For some reason, I couldn't get the password change (or even a new credential) to stick in Jenkins so that project was scrapped and we stood up a production project using a credential created specifically our Java build servers to access the TFS server.

        We've had firewall issues in the past.  If it's your local windows firewall, I don't think you need port numbers, you need to allow Jenkins or java.exe through the firewall.  If you have more than one java.exe on your machine (JRE, JDK, browser plugin, etc.) make sure you figure out which one is being used by Jenkins to create the appropriate firewall exception.
        Our VM and TFS servers are on different subnets, so for the VM where our Jenkins actually lives, we had to add proxy settings to both Jenkins and Maven (Google is your friend here) to get around the restrictions set up on the VM subnet.  

        Additionally, I've found that if your TFS server has a static IP, you can avoid some cross-domain dns problems by using server IP instead.

        Hope this helps,
        Dan O.

  22. Hi,

    Using TFS plugin, How can i exclude commits done by the build itself from triggering another build.?

    It is possible with 'Subversion plugin' using "Excluded Users" option.

    Thanks

  23. Hi

    jenkins v1.584 +  tfs plugin 3.1  It  show

    [NIS-VIP] $ tf workspaces -format:brief -server:http://10.200.130.60:8080/tfs/ ********
    TF30063: You are not authorized to access http://10.200.130.60:8080/tfs.
    FATAL: Executable returned an unexpected result code [100]
    ERROR: null

    when I try to get the project code,

    But , on the same windows server 2008 ,I can  use Visual stduio 2010 get the projcet code , did I forget something?

    *******job  tfs  configuration****************************************

    tfs server url: http:192.168.1.60:8080/tfs/mycollection

    project file: $test\test\

    user name: jenkins@staff

    password: *******

    *******************************************************************

    1. 1. jenkins 1.584 && tfs plugin 1.20 work right, the letter case must be right.

      2.jenkins 1.584 && tfs plugin 1.3.1 go error when get the  project code

      *********************error message *******************************
      E:\jenkins_workspace\workspace\NIS-VIP\XDF2010\XdfWebRegDAL\Super:
      正在获取 SuperDAL.cs
      FATAL: file must not be null
      java.lang.NullPointerException: file must not be null
      at com.microsoft.tfs.util.Check.throwForNull(Check.java:135)
      at com.microsoft.tfs.util.Check.notNull(Check.java:28)
      at com.microsoft.tfs.core.clients.versioncontrol.workspacecache.internal.InternalCacheLoader.loadConfig(InternalCacheLoader.java:89)
      at com.microsoft.tfs.core.clients.versioncontrol.Workstation.<init>(Workstation.java:150)
      at com.microsoft.tfs.core.clients.versioncontrol.Workstation.getCurrent(Workstation.java:206)
      at com.microsoft.tfs.core.clients.versioncontrol.VersionControlClient.<init>(VersionControlClient.java:450)
      at com.microsoft.tfs.core.clients.versioncontrol.VersionControlClient.<init>(VersionControlClient.java:520)
      at com.microsoft.tfs.core.config.client.DefaultClientFactory$7.newClient(DefaultClientFactory.java:238)
      at com.microsoft.tfs.core.config.client.DefaultClientFactory.newClient(DefaultClientFactory.java:91)
      at com.microsoft.tfs.core.TFSConnection.getClient(TFSConnection.java:1470)
      at com.microsoft.tfs.core.TFSTeamProjectCollection.getVersionControlClient(TFSTeamProjectCollection.java:359)
      at hudson.plugins.tfs.model.Project.getVCCHistory(Project.java:89)
      at hudson.plugins.tfs.model.Project.getDetailedHistory(Project.java:128)
      at hudson.plugins.tfs.actions.CheckoutAction.checkout(CheckoutAction.java:56)
      at hudson.plugins.tfs.TeamFoundationServerScm.checkout(TeamFoundationServerScm.java:176)
      at hudson.model.AbstractProject.checkout(AbstractProject.java:1253)
      at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:622)
      at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:528)
      at hudson.model.Run.execute(Run.java:1754)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:89)
      at hudson.model.Executor.run(Executor.java:240)

      *************************************************************************************************************************

      ***********************SuperDAL.cs  ************************

      using System;
      using System.Collections;
      using System.Data;
      using System.Data.SqlClient;
      using SystemService.DB;
      using Microsoft.ApplicationBlocks.Data;
      using XdfNis.SystemService.Util;
      using XdfWebRegBO;
      //using Utils;

      namespace XdfWebRegDAL
      {    
          public class SuperDAL
          {
              public static DataSet GetNetBooking(DateTime beginDate, DateTime endDate)
              {
                  using (SqlConnection conn = Conn.getConn())
                  {
                      try
                      {
                          string sql = string.Format(@"

      ************************************************************************

  24. Does the labeling feature added by @rodrigolopes work with Visual Studio Online (VSO)? I have been trying to use it but so far have not been able to get it to apply a label in VSO. Is there any way to apply a label in VSO?

    Thanks,

    Rob

  25. I just created JENKINS-26375, "Team Foundation Server Plugin (TFS) creates bogus users in 3.0 and later". Everything after 2.0 is detecting users as domain\userID where 2.0 and earlier just detected userID. Since the Active Directory authentication plugin also creates users as just userID and leaves off the domain, this means that TFS 3.0 and later is creating new, unique users and incorrectly sending email and linking change histories to those bogus accounts. Looks like pull request 17 is the culprit...can anyone clean this up and re-release?

    https://issues.jenkins-ci.org/browse/JENKINS-26375

  26. I just created JENKINS-26449, "Team Foundation Server Plugin: Team System Web Access repository browser links broken for TFS 2012 and 2013". They might also be broken for TFS 2010, but I don't use that and I know MS changed the link strategy for 2012 and 2013, so I detailed the current URL formats for the plugin and the expected/needed formats for TFS 2012/13. Hopefully someone can fix this so we can use the repo browser.

  27. hello,

    Anyone have experience setting up jenkins to use a TFS proxy?

    I need to set this up for a remote office and so far my attempts have not been successful.

    Thank you

  28. Hi,

    The plugin uses following commands to get the source from tfs

    tf.exe history $/path -recursive -stopafter:1 -noprompt -version:D2015-06-02T10:04:41Z -format:brief ******** -server:http://tfs:8080
    tf.exe workspaces -format:brief -server:http://tfs:8080 ********
    tf.exe workspace -new Hudson-proj-MASTER;user -noprompt -server:http://tfs:8080 ********
    tf.exe workfold -map $/path... localpath -workspace:Hudson-proj-MASTER -server:http://tfs:8080 ********
    tf.exe get . -recursive -version:VVVV -noprompt ********

    in tfs workspaces there is a option of  mapping multiple folders to the workspace, which this plugin does not provide the option, so essentialy it will invoke following for each folder to be mapped

    tf.exe workfold -map $/path... localpath -workspace:Hudson-proj-MASTER -server:http://tfs:8080 ********

    maybe if we can give option of specifying the folders as a comma seperated list this would be easy requirement to accomodate.

    regards

    Tarun

  29. Regarding TFS plug-in 4.0.0

    Please move the major feature to the top of the change list and indicate that there is a good change that it will break existing jobs, see:

    1. https://issues.jenkins-ci.org/browse/JENKINS-30355
    2. https://issues.jenkins-ci.org/browse/JENKINS-30382
    3. https://issues.jenkins-ci.org/browse/JENKINS-30330

    Thanks,

    Stefan

  30. It would be nice to have an environment variable for the changeset comment.

  31. Is there a way to use Jenkins credentials plugin to store passwords for different jobs? It becomes cumbersome to edit each job with new password for TFS.

    1. This becomes a huge issue for us, as we are using a common build user id for the whole company and the development team doesn't own the password. Guess this plugin is no longer under development as most of people already moved out of TFS.

  32. m r

    Hi. I use Git repository on Team Foundation Server 2013. Can I connect with that repository over this plugin?

    Thanks.

  33. Hi, this is Team Foundation Server Plug-in  5.2.1 show in the  changes(Pic 1).  'Microsoft ......' is so long and so ugly. 

    What about  revert  the  'Microsoft ......'  to 'detail'  , when click on the 'detail' ,turn to  file chang  list(Pic 2), then click on the 'diff' (Pic 2)  turn to the different of the code change ?

    Is  it  better for looking ?

     Pic 1

    Pic 2  
     

  34. Hi, does this plugin support SNI? Since our TFS server is upgraded to 2017 I am not able to connect to the server. The TFS Url is now "https" url.

    After investigating a lot and running wireshark we found out that request made by Jenkins is missing SNI information hence TFS server is rejecting the request made by Jenkins. The complete stack trace of the error is as mentioned below.

    Thank you so much for your help.

     

    FATAL: com.microsoft.tfs.core.exceptions.TECoreException: Software caused connection abort: recv failed
    java.net.SocketException: Software caused connection abort: recv failed
    	at java.net.SocketInputStream.socketRead0(Native Method)
    	at java.net.SocketInputStream.socketRead(Unknown Source)
    	at java.net.SocketInputStream.read(Unknown Source)
    	at java.net.SocketInputStream.read(Unknown Source)
    	at sun.security.ssl.InputRecord.readFully(Unknown Source)
    	at sun.security.ssl.InputRecord.read(Unknown Source)
    	at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
    	at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
    	at sun.security.ssl.SSLSocketImpl.writeRecord(Unknown Source)
    	at sun.security.ssl.AppOutputStream.write(Unknown Source)
    	at java.io.BufferedOutputStream.flushBuffer(Unknown Source)
    	at java.io.BufferedOutputStream.flush(Unknown Source)
    	at com.microsoft.tfs.core.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:541)
    	at com.microsoft.tfs.core.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2260)
    	at com.microsoft.tfs.core.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1202)
    	at com.microsoft.tfs.core.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:432)
    	at com.microsoft.tfs.core.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:182)
    	at com.microsoft.tfs.core.httpclient.HttpClient.executeMethod(HttpClient.java:428)
    	at com.microsoft.tfs.core.httpclient.HttpClient.executeMethod(HttpClient.java:343)
    	at com.microsoft.tfs.core.ws.runtime.client.SOAPService.executeSOAPRequestInternal(SOAPService.java:545)
    Caused: com.microsoft.tfs.core.ws.runtime.exceptions.TransportException: Software caused connection abort: recv failed
    	at com.microsoft.tfs.core.ws.runtime.client.SOAPService.executeSOAPRequestInternal(SOAPService.java:674)
    	at com.microsoft.tfs.core.ws.runtime.client.SOAPService.executeSOAPRequest(SOAPService.java:444)
    	at ms.tfs.services.registration._03._RegistrationSoap12Service.getRegistrationEntries(_RegistrationSoap12Service.java:106)
    	at com.microsoft.tfs.core.clients.registration.RegistrationData.newFromServer(RegistrationData.java:58)
    Caused: com.microsoft.tfs.core.exceptions.TECoreException: Software caused connection abort: recv failed
    	at com.microsoft.tfs.core.exceptions.mappers.TECoreExceptionMapper.map(TECoreExceptionMapper.java:92)
    	at com.microsoft.tfs.core.exceptions.mappers.RegistrationExceptionMapper.map(RegistrationExceptionMapper.java:18)
    	at com.microsoft.tfs.core.clients.registration.RegistrationData.newFromServer(RegistrationData.java:61)
    	at com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationData(RegistrationClient.java:617)
    	at com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationEntries(RegistrationClient.java:144)
    	at com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationEntries(RegistrationClient.java:129)
    	at com.microsoft.tfs.core.PreFrameworkServerDataProvider.findServiceLocation(PreFrameworkServerDataProvider.java:275)
    	at com.microsoft.tfs.core.PreFrameworkServerDataProvider.locationForCurrentConnection(PreFrameworkServerDataProvider.java:251)
    	at com.microsoft.tfs.core.TFSTeamProjectCollection.getServerDataProvider(TFSTeamProjectCollection.java:172)
    	at com.microsoft.tfs.core.TFSConnection.getWebService(TFSConnection.java:896)
    	at com.microsoft.tfs.core.config.client.DefaultClientFactory$7.newClient(DefaultClientFactory.java:214)
    	at com.microsoft.tfs.core.config.client.DefaultClientFactory.newClient(DefaultClientFactory.java:92)
    	at com.microsoft.tfs.core.TFSConnection.getClient(TFSConnection.java:1459)
    	at com.microsoft.tfs.core.TFSTeamProjectCollection.getVersionControlClient(TFSTeamProjectCollection.java:376)
    	at hudson.plugins.tfs.model.Server.getVersionControlClient(Server.java:218)
    	at hudson.plugins.tfs.commands.ListWorkspacesCommand.call(ListWorkspacesCommand.java:50)
    	at hudson.plugins.tfs.commands.ListWorkspacesCommand.call(ListWorkspacesCommand.java:21)
    	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.Workspaces.getListFromServer(Workspaces.java:36)
    	at hudson.plugins.tfs.model.Workspaces.populateMapFromServer(Workspaces.java:45)
    	at hudson.plugins.tfs.model.Workspaces.exists(Workspaces.java:71)
    	at hudson.plugins.tfs.actions.RemoveWorkspaceAction.remove(RemoveWorkspaceAction.java:25)
    	at hudson.plugins.tfs.TeamFoundationServerScm.checkout(TeamFoundationServerScm.java:308)
    	at hudson.model.AbstractProject.checkout(AbstractProject.java:1280)
    	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)
    	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
    	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
    	at hudson.model.Run.execute(Run.java:1735)
    	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    	at hudson.model.ResourceController.execute(ResourceController.java:97)
    	at hudson.model.Executor.run(Executor.java:405)
  35. I am trying to configure TFS plugin from manage Jeknins page. I am not able to add credentials as the Add button is locked. Please refer screenshot:

    1. Puneet Sharma, that happens when your account does not have the Credentials / Create permission.

  36. Hello everybody, 

    we are facing an issue with jenkins queue job. Indeed, the job is failed when a build failed on jenkins. 

    2018-04-05T23:55:39.5980912Z Everything is Ok
    2018-04-05T23:55:39.5980912Z
    2018-04-05T23:55:39.5980912Z Size: 81680
    2018-04-05T23:55:39.5980912Z Compressed: 5523
    2018-04-05T23:55:39.5980912Z
    2018-04-05T23:55:39.6720955Z ##[error]Jenkins pipeline failed
    2018-04-05T23:55:39.6730960Z ##[section]Finishing: Queue Jenkins Job: Android_Basic_Sanety_Check
    This prevent the nest task on the build to run (Publist Test Result ...). 
    I don't know if someone has already faced this issue, any help would be appreciated
  37. We are trying to use TFS Plugin to setup CI (Continuous integration) builds on Jenkins. But we are getting following heap error when there is new build got triggered. (This is intermittent error)
    Jenkins server version => Jenkins ver. 2.118
    Team foundation server => 5.126.0
    Any idea how to solve it ?
    Getting version 'C137330' to 'C:\am_b1'...
    FATAL: java.io.IOException: Remote call on JNLP4-connect connection from abc.com.sg failed
    java.lang.OutOfMemoryError: Java heap space
    at java.util.Arrays.copyOfRange(Unknown Source)
    at java.lang.String.<init>(Unknown Source)
    at java.lang.String.substring(Unknown Source)
    at com.ctc.wstx.util.TextBuilder.getEntry(TextBuilder.java:91)
    at com.ctc.wstx.sr.AttributeCollector.getValue(AttributeCollector.java:238)
    at com.ctc.wstx.sr.BasicStreamReader.getAttributeValue(BasicStreamReader.java:636)
    at ms.tfs.versioncontrol.clientservices._03._GetOperation.readFromElement(_GetOperation.java:567)
    at ms.tfs.versioncontrol.clientservices._03._Repository5Soap_GetResponse.readFromElement(_Repository5Soap_GetResponse.java:114)
    at ms.tfs.versioncontrol.clientservices._03._Repository5Soap12Service$2.readSOAPResponse(_Repository5Soap12Service.java:116)
    at com.microsoft.tfs.core.ws.runtime.client.SOAPService.executeSOAPRequestInternal(SOAPService.java:613)
    at com.microsoft.tfs.core.ws.runtime.client.SOAPService.executeSOAPRequest(SOAPService.java:444)
    at ms.tfs.versioncontrol.clientservices._03._Repository5Soap12Service.get(_Repository5Soap12Service.java:109)
    at com.microsoft.tfs.core.clients.versioncontrol.internal.WebServiceLayer.get(WebServiceLayer.java:941)
    at com.microsoft.tfs.core.clients.versioncontrol.internal.WebServiceLayerLocalWorkspaces.get(WebServiceLayerLocalWorkspaces.java:760)
    at com.microsoft.tfs.core.clients.versioncontrol.soapextensions.Workspace.get(Workspace.java:2434)
    at com.microsoft.tfs.core.clients.versioncontrol.soapextensions.Workspace.get(Workspace.java:2341)
    at com.microsoft.tfs.core.clients.versioncontrol.soapextensions.Workspace.get(Workspace.java:2331)
    at com.microsoft.tfs.core.clients.versioncontrol.soapextensions.Workspace.get(Workspace.java:2308)
    at hudson.plugins.tfs.commands.GetFilesToWorkFolderCommand.call(GetFilesToWorkFolderCommand.java:72)
    at hudson.plugins.tfs.commands.GetFilesToWorkFolderCommand.call(GetFilesToWorkFolderCommand.java:18)
    at hudson.remoting.UserRequest.perform(UserRequest.java:212)
    at hudson.remoting.UserRequest.perform(UserRequest.java:54)
    at hudson.remoting.Request$2.run(Request.java:369)

  38.  Hi, everyone.

    I have configured Jenkins + TFS using "Team Foundation Server Plug-in". According to trigger, when i make commit plugin starts job on Jenkins. But in logs i cajn see next error:

    Started by user admin
    ERROR: Error while trying to update pending status in TFS/Team Services
    java.lang.NullPointerException
    	at hudson.plugins.tfs.util.UriHelper.join(UriHelper.java:229)
    	at hudson.plugins.tfs.util.UriHelper.join(UriHelper.java:196)
    	at hudson.plugins.tfs.util.TeamRestClient.addCommitStatus(TeamRestClient.java:223)
    	at hudson.plugins.tfs.util.TeamStatus.createFromRun(TeamStatus.java:74)
    	at hudson.plugins.tfs.TeamPendingStatusBuildStep.perform(TeamPendingStatusBuildStep.java:44)
    	at hudson.plugins.tfs.TeamGlobalStatusPoster.onStarted(TeamGlobalStatusPoster.java:20)
    	at hudson.plugins.tfs.TeamGlobalStatusPoster.onStarted(TeamGlobalStatusPoster.java:13)
    	at hudson.model.listeners.RunListener.fireStarted(RunListener.java:240)
    	at hudson.model.Run.execute(Run.java:1811)
    	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    	at hudson.model.ResourceController.execute(ResourceController.java:97)
    	at hudson.model.Executor.run(Executor.java:429)
    [EnvInject] - Loading node environment variables.
    Building in workspace C:\buildDir\services\GSEC_TEST
    [WS-CLEANUP] Deleting project workspace...
    [WS-CLEANUP] Done
    Cloning the remote Git repository

    ********************************************************* part of repository*********************************************************

     > git.exe rev-parse "null^{commit}" # timeout=10
    FATAL: Command "git.exe rev-parse "null^{commit}"" returned status code 128:
    stdout: null^{commit}
    
    stderr: fatal: ambiguous argument 'null^{commit}': unknown revision or path not in the working tree.
    Use '--' to separate paths from revisions, like this:
    'git <command> [<revision>...] -- [<file>...]'
    
    hudson.plugins.git.GitException: Command "git.exe rev-parse "null^{commit}"" returned status code 128:
    stdout: null^{commit}
    
    stderr: fatal: ambiguous argument 'null^{commit}': unknown revision or path not in the working tree.
    Use '--' to separate paths from revisions, like this:
    'git <command> [<revision>...] -- [<file>...]'
    
    	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2002)
    	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1970)
    	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1966)
    	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1597)
    	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1609)
    	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.revParse(CliGitAPIImpl.java:794)
    	at hudson.plugins.git.GitAPI.revParse(GitAPI.java:316)
    	at hudson.plugins.git.RevisionParameterAction.toRevision(RevisionParameterAction.java:98)
    	at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:1070)
    	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1187)
    	at hudson.scm.SCM.checkout(SCM.java:504)
    	at hudson.model.AbstractProject.checkout(AbstractProject.java:1208)
    	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:574)
    	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
    	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499)
    	at hudson.model.Run.execute(Run.java:1815)
    	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    	at hudson.model.ResourceController.execute(ResourceController.java:97)
    	at hudson.model.Executor.run(Executor.java:429)
    ERROR: Error while trying to update completion status in TFS/Team Services

     

    Please help with this problem. is it a problem with configuration or with plugin?

Write a comment…