jessehouwing / azure-pipelines-tfvc-tasks

Azure Pipelines tasks for Team Foundation Version Control
https://marketplace.visualstudio.com/items?itemName=jessehouwing.jessehouwing-vsts-tfvc-tasks
MIT License
27 stars 18 forks source link

Add a check-out task #36

Closed Scott-Pearce closed 7 years ago

Scott-Pearce commented 7 years ago

I've found that some files that are part of a project (i.e. a Microsoft Access database) are read-only until explicitly checked-out. Therefore any build time editing of such files will fail. An explicit check out task would solve this issue.

jessehouwing commented 7 years ago

Can you send me a sample file for me to check this against? In local workspaces this really shouldn't be needed...

On Nov 22, 2016 21:39, "Scott-Pearce" notifications@github.com wrote:

I've found that some files that are part of a project (i.e. a Microsoft Access database) are read-only until explicitly checked-out. Therefore any build time editing of such files will fail. An explicit check out task would solve this issue.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jessehouwing/vsts-tfvc-tasks/issues/36, or mute the thread https://github.com/notifications/unsubscribe-auth/AD-uS55QJCP2aLWdKHFfi3PbN1G_Ld2bks5rA2EKgaJpZM4K5-LA .

jessehouwing commented 7 years ago

I can't reproduce this locally. Can you share:

jessehouwing commented 7 years ago

I just ran a build with these files and it works flawlessly. This access database got checked in just fine. image

Your files aren't supposed to be read-only, that's a Server workspace thing and the build agent always uses a local workspace. If you are using server workspaces for whatever reason, or are changing the workspace type as part of the build, then you will get in trouble with my tasks. They rely on local workspaces and edits are detected automatically.

jessehouwing commented 7 years ago

Looks like you may be running into the same issue as @ChristophLindemann in #37. I can't repro it locally in VSTS, TFS 2015 update 3 and TFS 2017...

jessehouwing commented 7 years ago

Got verification from Microsoft that your workspace should not be configured as a server workspace and that the build agent doesn't create workspaces with that configuration by itself (or that would be a bug). There has been a very early 2.0 preview agent where the workspaces were created as server and that has subsequently been turned off. It's probably best to change the workspace type to local or remove the workspace altogether so the agent will recreate it. I will look at building in detection and a warning when the workspace has been configured incorrectly.

jessehouwing commented 7 years ago

Found the cause for the behavior you're seeing. When using agent version 1.x and using default server workspaces and not allowing multiple checkouts on a project, the build agent will create a server workspace.

Please upgrade to agent 2.x or enable multiple checkouts on your project.

See #38 for more information.

jessehouwing commented 7 years ago

after Microsoft came back with the fact that on agent 1.x it is supported to use server workspaces, but that even they didn't realize it ;), I've created an experimental package that holds a Checkout task... if you're willing to help me test and find the cases that are and aren't working, I'd be willing to share it to your accounts.

ChristophLindemann commented 7 years ago

Hi @jessehouwing,

That sounds awesome, and I am happy to test it here, on TFS 2015.3, and if that works on the produktion server running 2015.2.1.