What is the recomended TFS build template for FAKE integration? - tfs

FAKE documentation has description for integrating with TeamCity but there is no detailed description on TFS integration.
I think I need a custom build process template but before I create one I wanted to make sure that none exists.
Could you recommend me TFS template that integrates FAKE?

You need to create a custom activity that hosts and runs your FAKE process.
http://www.hanselman.com/blog/ExploringFAKEAnFBuildSystemForAllOfNET.aspx
There is some good documentation online for creating custom activities:
http://blogs.msdn.com/b/jimlamb/archive/2009/11/18/how-to-create-a-custom-workflow-activity-for-tfs-build-2010.aspx
And I recommend that you add it to the Community Build Tool project.

Related

Migrating a build definition from TFS to VSTS

I've been tasked with migrating a build from TFS to VSTS, I've used TFS from a developer point of view, however I've never created builds. Can anyone give me any advice where to start, good websites, tutorials, tools that might help, anything that might catch me out etc, basically my knowledge on this is very limited so anything would help. I've no doubt there must be somebody out there who can say we've done this, here is what we did...the new VSTS build will need to be a copy of the TFS build however some analysis needs to be done as the build process is old and certain parts may not be necessary. Thanks in advance!
Migrate New Vnext build definition from TFS to VSTS
If you want to template your builds or move them from TFS to VSTS, you could also use the REST API's to perform this. Details please refer this blog: HOW TO MOVE BUILD DEFINITIONS IN TFS TO OTHER PROJECTS USING THE REST API
Another example shown here. It shows how to get the JSON response of a build definition and again using the same reference to make a new one in the project you desire.
Migrate Old XAML to New Vnext build definition from TFS to VSTS
Unfortunately, there will not be any automated conversion processes. The new builds are based on a different architecture and run on a completely different system. And you can use both the new builds and agents alongside your XAML builds, controllers, and agents.
If you have heavily customized XAML builds and custom activities, you
can continue using those builds until you are ready to port your
business logic into scripts that can run in the new builds.
You should also take a look at these series of articles by jessehouwing devoted specifically to the case like yours.
About how to create a build, you could refer this tutorial from MSDN.

How can I create a new GitLab Project Service?

I am currently evaluating GitLab for the development process in a new team. For reasons that are beyond my control I need to integrate with TFS build (so that a merge request kicks off a new build and the build reports status to the merge request, etc). It seems, from what I have learned so far, that the only way to achieve this seamlessly would be with a new Project Service.
Is this true and if so how would I go about creating one?
I have searched through the relevant docs and forums and I can't find much information of use so I suspect that Project Services are less of an arbitrary, open plug-in style model but rather more a core part of the product. I am hoping to be proved wrong...
If the integrate of GitLab and TFS build means you want through GitLab to queue the TFS build automatically.
You may have to create your own service to receive the webhooks form Gitlab(How do I create a GitLab webhook?). And then trigger TFS build.
You might have a look at:
(paths taken from docker container)
/opt/gitlab/embedded/service/gitlab-rails/…
…/app/models/project_services/
have a look at the template: app/models/project_services/ci_service.rb
…/app/models/project.rb
…/app/models/service.rb
…/lib/api/v3/services.rb
…/lib/api/services.rb
where the first three are the most relevant, the api to complete the REST services.
But no, I wasn't able to find any documentation either...

Custom TFS build definition templates across projects

TFS provides a list of templates that I can use for new build definitions:
Once I've used "Save as template..." on a build definition, I can then use it as a template within that project:
But when I switch to a different project, that custom template is no longer available.
How can I create a build template that I can use in any project?
There is no way to directly copy or sync a vNext build definition template between team projects on the Web Portal. The build definition template is only for the present team project. So you need to create a build definition template for each team project.
And also there have been a feature request in user voice, you can vote up and monitor it
VSO build vnext: share build templates between projects
https://visualstudio.uservoice.com/forums/330519-team-services/suggestions/8468566-vso-build-vnext-share-build-templates-between-pro
However, for a workaround, you can use the REST API to perform this. Here is an example shown in the blog.
It shows how to get the JSON response of a build definition and again using the same reference to make a new one in the project you desire.
You can also take a look at this nice article: How to move build definitions in TFS to other projects using the REST API
As for now it is not supported but you can vote it up to make it happen faster:
https://visualstudio.uservoice.com/forums/330519-team-services/suggestions/8468566-vso-build-vnext-share-build-templates-between-pro

Is it possible to add custom build runners to MS Team Foundation Build Server?

I've recently developed custom build runners (plugins) to TeamCity and Jenkins. The plugins enable the users to start automated load tests as part of the build process.
To give you some idea here's the Jenkins plugin page with a lot of description:
https://wiki.jenkins-ci.org/display/JENKINS/Apica+Loadtest+Plugin
Here are a couple of screenshots of the TeamCity plugin:
The setup GUI: https://i.imgsafe.org/5221a01.png
Build log: https://i.imgsafe.org/c93f7f9.png
Custom tab with load test summary: https://i.imgsafe.org/f5b6937.png
Setup validation example: https://i.imgsafe.org/52cc9a2.png
These Continuous Integration frameworks allow a high level of customisation for plugin development: the UI, the output, client and server code etc. can all be tailored.
I've received a question whether we can develop a similar build runner for MS Team Foundation Build Service. I've completely new to TFS, I've never used it for anything. I've read through a couple of tutorials on how to install and set up TFS but there seems to be very little material available regarding custom build runners. The closest I've got are the following pages:
https://msdn.microsoft.com/en-us/library/bb130146.aspx
http://blogs.msdn.com/b/jimlamb/archive/2010/02/12/how-to-create-a-custom-workflow-activity-for-tfs-build-2010.aspx
However, they don't provide any example on GUI extensions, validation, customisation etc.
Therefore I'd like to get the opinion of experienced TFS users before we get any more serious with the framework:
is it possible to develop plugins for TFS build?
what are the limitations? E.g. can I build a custom GUI with custom client/server actions?
can I include custom pages, show graphs etc?
Any advice is welcome.
Thanks for your help,
Andras
When it comes to TFS Build, you first need to know that there are two build systems: XAML Build and a new, now default, build system.
XAML Builds are based on Windows Workflow Foundation. You can create custom activities and add these to a Build Definition Template. XAML Build only run on Windows and extending them is not very easy.
The new Build system is based on Node, runs cross-platform and is very easily extendable. Microsoft has open sourced all the tasks they have for TFS Build (see GitHub for the repository).
Targeting the new build system means that you support on-premises installations of TFS 2015 and the cloud hosted version of TFS: Visual Studio Team Services (see visualstudio.com for more info).
The easiest way to get started is by creating a new VSTS account (free!), adding some code and running a build. If you have that working, you can start exploring the existing build tasks and learn what's possible. You can then easily create your own task and start experimenting.
One thing that might be of interest to you is that TFS/VSTS already support load testing. You can run a very simple load test with a couple of mouse clicks or configure more complex Web Tests and use these in TFS in combination with Application Insights. I'm not sure if that's what your customers are looking for but it's worth checking out (see Cloud-based Load Testing for more information)

bdd(specflow) and tfs build?

I manage to use bddlib(storyq) with combination of xunit.net using resharper runner. Than decided to try to specflow, since have read its advantages over storyq.
Now I do have also another requirement to integrate this all with tfs build 2010. Am bit lost there how the big picture gonna look like. I found some articles on how to make work xunit.net with tfsbuild 2010, however there is no single word on bdd lib integration with tfsbuild more specifically continuous integration (ci).
Anyone could have helped ? thanks.
If you can run it from the command-line you can simply customize your TFS Build workflow by tossing an InvokeProcess activity in there. An example of customizing the workflow can be seen here: http://www.ewaldhofman.nl/post/2010/04/28/Customize-Team-Build-2010-e28093-Part-3-Use-more-complex-arguments.aspx

Resources