Fwd: Question about TFS Plugin

400 views
Skip to first unread message

Andrew Gray

unread,
Sep 27, 2012, 11:11:29 PM9/27/12
to jenkin...@googlegroups.com, jenkins...@googlegroups.com
Hi All,

Just wondering if anyone else has had the below issue.  I can see that is it talking to TFS but it is just refuses to get the latest version of code from the server into the Jenkins job workspace.

What am I doing wrong? Has anyone managed to get this working?

Also, as an aside: Is this plugin still being maintained?

Regards,

Andrew


---------- Forwarded message ----------
From: Andrew Gray <andrew.p...@gmail.com>
Date: 27 September 2012 14:14
Subject: Question about TFS Plugin
To: eram...@gmail.com


Hi Eric,

I am using the TFS plugin for the first time.  May I ask some questions?


Background
I am automating the build and have written a series of DOS batch scripts to make life easier.  This is currently necessary for a series of project specific reasons (unfortunately). I am trying string these scripts together in a Jenkins job.  The first step is to checkout the code to my Jenkins workspace.

I already have one TFS workspace set up on my development machine that is not pointing to my Jenkins workspace which I am using for general bug fixing and development

If I just kick off the build I get the following console output (credentials masked)
Started by user Andrew Gray
Building on master in workspace C:\JenkinsService\workspace\LocalCheckout
[LocalCheckout] $ "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\tf.exe" workspaces -format:brief -server:http://ndevic-ids07v:8080/tfs ********
No workspace matching *;tfssetup on computer OVLM4600G3Z4CT1 found in Team Foundation Server http://ndevic-ids07v:8080/tfs.
[LocalCheckout] $ "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\tf.exe" workspace -new Hudson-LocalCheckout;nde\tfssetup -noprompt -server:http://ndevic-ids07v:8080/tfs ********
[LocalCheckout] $ "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\tf.exe" workfold -map $/TollTransitions/Source/Support . -workspace:Hudson-LocalCheckout -server:http://ndevic-ids07v:8080/tfs ********
[LocalCheckout] $ "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\tf.exe" get . -recursive -version:D2012-09-27T04:06:58Z -noprompt ********
All files are up to date.
[LocalCheckout] $ "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\tf.exe" history $/TollTransitions/Source/Support -noprompt -version:D2012-09-27T03:35:00Z~D2012-09-27T04:06:59Z -recursive -format:detailed -server:http://ndevic-ids07v:8080/tfs ********
No history entries were found for the item and version combination specified.
[LocalCheckout] $ "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\tf.exe" history . -recursive -stopafter:1 -noprompt -version:WHudson-LocalCheckout;domain\username -format:brief ********
No history entries were found for the item and version combination specified.
Finished: SUCCESS

The plugin appears to be doing all the right things, but it is saying that "All files are up to date", why is the plugin not checking out the files for this brand new workspace (Hudson-LocalCheckout)?

If I first create a new workspace in Visual Studio mapping the project root to the Jenkins workspace of a new job, I get the following console output when I kick off a build (credentials masked):
Started by user Andrew Gray
Building on master in workspace C:\JenkinsService\workspace\LocalCheckout
[LocalCheckout] $ "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\tf.exe" workspaces -format:brief -server:http://ndevic-ids07v:8080/tfs ********
No workspace matching *;tfssetup on computer OVLM4600G3Z4CT1 found in Team Foundation Server http://ndevic-ids07v:8080/tfs.
[LocalCheckout] $ "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\tf.exe" workspace -new Hudson-LocalCheckout;nde\tfssetup -noprompt -server:http://ndevic-ids07v:8080/tfs ********
The path C:\JenkinsService\workspace\LocalCheckout is already mapped in workspace OVLM4600G3Z4CT1_1;domainYYY\andrewg [http://ndevic-ids07v:8080/tfs/xxxxxxxx].
FATAL: Executable returned an unexpected result code [100]
ERROR: null
Finished: FAILURE

Kind Regards,

Andrew

Erik Ramfelt

unread,
Sep 29, 2012, 8:02:57 AM9/29/12
to jenkin...@googlegroups.com, jenkins...@googlegroups.com
Hi

The plugin is not being actively maintained as in adding new features
and such, ive tried to fix crashes and other bugs. As I dont use TFS
at work, i havent tested it for real, which means Im not sure how it
copes in the long run and under stress. Perhaps someone on the list
has used it and either could let me know if it works or not.


Could you please reproduce the exact command line executions in a
command prompt and see if you get the same results? If so then it is a
problem with the plugin (perhaps some tool args has been left out).
If that works, could you then enter the same commands into a Batch
build step on Jenkins and see if you get the same results= If so, then
it is a problem how Jenkins is run (user, acl, etc).

Regards
//Erik

2012/9/28 Andrew Gray <andrew.p...@gmail.com>:

Andrew Gray

unread,
Sep 30, 2012, 8:48:22 PM9/30/12
to jenkin...@googlegroups.com, Mikael....@hm.com
Console log from Jenkins job:
Started by user Andrew Gray
Building on master in workspace C:\JenkinsService\workspace\LocalCheckout
Deleting workspace as the configuration has changed since a build was performed on this computer.
[LocalCheckout] $ "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\tf.exe" workspaces -format:brief -server:http://ndevic-ids07v:8080/tfs ********
Collection: http://ndevic-ids07v:8080/tfs
Workspace            Owner    Computer        Comment
-------------------- -------- --------------- ---------------------------------
Hudson-LocalCheckout tfssetup OVLM4600G3Z4CT1 
[LocalCheckout] $ "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\tf.exe" workspace -delete Hudson-LocalCheckout;nde\tfssetup -noprompt -server:http://ndevic-ids07v:8080/tfs ********
[LocalCheckout] $ "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\tf.exe" workspace -new Hudson-LocalCheckout;nde\tfssetup -noprompt -server:http://ndevic-ids07v:8080/tfs ********
[LocalCheckout] $ "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\tf.exe" workfold -map $/TollTransitions/Source/Support . -workspace:Hudson-LocalCheckout -server:http://ndevic-ids07v:8080/tfs ********
[LocalCheckout] $ "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\tf.exe" get . -recursive -version:D2012-09-27T05:50:07Z -noprompt ********
All files are up to date.
[LocalCheckout] $ "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\tf.exe" history $/TollTransitions/Source/Support -noprompt -version:D2012-09-27T05:47:01Z~D2012-09-27T05:50:08Z -recursive -format:detailed -server:http://ndevic-ids07v:8080/tfs ********
No history entries were found for the item and version combination specified.
[LocalCheckout] $ "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\tf.exe" history . -recursive -stopafter:1 -noprompt -version:WHudson-LocalCheckout;nde\tfssetup -format:brief ********
No history entries were found for the item and version combination specified.
Finished: SUCCESS

Command line executions:
If I run these commands exactly from the command line from the c:\JenkinsService\workspace\LocalCheckout I get:

C:\JenkinsService\workspace\LocalCheckout> "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\tf.exe" workspaces -format:brief -server:http://nd
evic-ids07v:8080/tfs
No workspace matching *;andrewg on computer OVLM4600G3Z4CT1 found in Team Foundation Server http://ndevic-ids07v:8080/tfs.

C:\JenkinsService\workspace\LocalCheckout>"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\tf.exe" workspace -delete Hudson-LocalCheckout;nde\

tfssetup -noprompt -server:http://ndevic-ids07v:8080/tfs

C:\JenkinsService\workspace\LocalCheckout>"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\tf.exe" workspace -new Hudson-LocalCheckout;nde\tfs

setup -noprompt -server:http://ndevic-ids07v:8080/tfs

C:\JenkinsService\workspace\LocalCheckout>"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\tf.exe" workfold -map $/TollTransitions/Source/Supp

ort . -workspace:Hudson-LocalCheckout -server:http://ndevic-ids07v:8080/tfs
TF14061: The workspace Hudson-LocalCheckout;OAKTON\andrewg does not exist.

C:\JenkinsService\workspace\LocalCheckout>"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\tf.exe" workfold -map $/TollTransitions/Source/Supp
ort . -workspace:Hudson-LocalCheckout -server:http://ndevic-ids07v:8080/tfs /login:nde\tfssetup,xxmaskedxx


C:\JenkinsService\workspace\LocalCheckout>"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\tf.exe" get . -recursive -version:D2012-09-27T05:50
:07Z -noprompt
TF204017: The operation cannot be completed because the user (OAKTON\andrewg) does not have one or more required permissions (Use) for workspace Hudson-LocalC
heckout;NDE\tfssetup.

C:\JenkinsService\workspace\LocalCheckout>"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\tf.exe" get . -recursive -version:D2012-09-27T05:50
:07Z -noprompt /login:nde\tfssetup,
xxmaskedxx
All files are up to date.

C:\JenkinsService\workspace\LocalCheckout>

I have added the commands in red adding the /login parameter.  I have configured the job with these details but they don't appear in the console output.  Are they being used by the plugin?

The nde\tfssetup user is the admin user we use to remote connect to the tfs build server. I am unable to run the Jenkins Service as the nde\tfssetup user.

Even adding the /login it still says "All files up to date".  (I read somewhere that this is the only response you get out of TFS in the event of any exception/other problem....thanks Microsoft)

If, after it has created the new workspace (third command above), I run workspaces (first command above) again, just to see what it has done I see that it has:

Collection: http://ndevic-ids07v:8080/tfs
Workspace            Owner    Computer        Comment
-------------------- -------- --------------- ---------------------------------------------------------------------------------------------------------------
Hudson-LocalCheckout tfssetup OVLM4600G3Z4CT1

So it appears to have done something....

If I then run the workfold map command (fourth command above) and then run workspaces again I get the same output:

Collection: http://ndevic-ids07v:8080/tfs
Workspace            Owner    Computer        Comment
-------------------- -------- --------------- ---------------------------------------------------------------------------------------------------------------
Hudson-LocalCheckout tfssetup OVLM4600G3Z4CT1

Did map do anything?

If I run workfold map command a second time....command completes with no output...third and fourth time...command completes with no output

If I run new workspace command again:

The path C:\JenkinsService\workspace\LocalCheckout is already mapped in workspace Hudson-LocalCheckout.

So mapping has done something.

So it appears everything is set up for the get command to retrieve the source code.

Confirming that C:\JenkinsService\workspace\LocalCheckout is an empty directory. No hidden files.

If I now run the get command (including the login parameter with the credentials) I get:

All files are up to date.

Does anyone know why is the get failing?

Regards,

Andrew

dmarkov

unread,
Oct 25, 2012, 11:15:30 AM10/25/12
to jenkin...@googlegroups.com
Hi Andrew,

Did you succeed to solve your problem as I experiencing the same one?
If yes, it will be great to share the solution.

Thanks in advance!

Regards,
Deyan



--
View this message in context: http://jenkins.361315.n4.nabble.com/Fwd-Question-about-TFS-Plugin-tp4641648p4644370.html
Sent from the Jenkins dev mailing list archive at Nabble.com.

Andrew Gray

unread,
Oct 25, 2012, 6:31:26 PM10/25/12
to jenkin...@googlegroups.com
Hi All,

Short answer: No I didn't.

Longer answer: I have raised JENKINS-15384 requesting this functionality be fixed.  Please vote for it to give it attention.  Question:  Has anyone out there had ANY success getting the latest version of a projects files out of TFS using ANY means?  Please let us know how you did it...it appears to me to be a failing of tf.exe from Microsoft, although that would surprise me that it is totally broken (at least that is how it appears to me at the moment).

Cheers,

Andrew

linards...@gmail.com

unread,
Oct 26, 2012, 7:00:12 AM10/26/12
to jenkin...@googlegroups.com

Hehehe. .. Let me put this on other perspective - if Microsoft would not even provide native support for their azure service for most popular CI, i would be surprised anything related to open-source would be fully functional... Team foundation is not ide platform that is intrded anythong other than for upcoming Windows 8 garage so your best option to get usef to it. I wm not helping to solve this issue, but i hope it will make you to plan more than just rely on particular vendor.

Andrew Gray

unread,
Oct 26, 2012, 7:17:17 AM10/26/12
to jenkin...@googlegroups.com
:) i didn't choose TFS.

If I had my choice the source code would be in a git repo and we'd be connecting to it with gitextensions.

That would make my life a lot easier, but I am dealing with a group of Microsoft sheep who "Microsoft-all-the-way".

Cheers,

Andrew

Linards Liepiņš

unread,
Oct 26, 2012, 7:31:29 AM10/26/12
to jenkin...@googlegroups.com
Feeling for ya, mate. Truly do. I am living on Delph, Jenkins, NSIS and Ant and screw Microsoft in each and every possibility I can. :) Only thing I cannot escape is SSMS :/

2012/10/26 Andrew Gray <andrew.p...@gmail.com>



--
A.C. Linards L.
Reply all
Reply to author
Forward
0 new messages