We have migrated TFS2010 to TFS2015sp3 and we would like to use the existing TFS2010 build controller & agents (XAML) with TFS2015.
As a sample test, we did a clone of the existing TFS2010 controller and on the new machine we pointed the Project collections to the new TFS2015 URL.
I see the build controller and Agents in running state, but when I queue the build it keeps on waiting for build agent, even though the agents are online.
TFS 2015 still support XAML Builds as long as you use TFS2010/TFS2013 XAML Build controller.
Please make sure your build control version are the same as build agent version. So if you are using TFS2010 build control, you should also using TFS2010 build agent.
You could also create a new build control TFS2015 and build agent 2015, test if the build works properly.
Even though the build agent and control is online, you should also double confirm you have selected the right one in the drop list when you queue the build.
Besides, please also verify that your controller has "Maximum number of concurrently running builds" set to a number higher than 0. The default to number of agents can sometimes go wrong.
You set this on the controller properties in the TFS admin console.
You can also try remove the agent from the controller and add it again.
Related
I'd like to be able to trigger a build in TFS Build when a developer tags in Subversion. I'd also like to use the tag number as part of the build and release name. Is this possible in TFS right now?
There is no this built-in trigger for building a repository type of subversion in TFS.
You could first get the event (a developer create a tag in svn) from SVN. Not sure how to do this in SVN, should be something like the service hooks in TFS. Then trigger a build in TFS 2017 using REST API. How to do this please refer: How to trigger a build in TFS 2015 using REST API
As for how to use the tag number as part of the build and release name, see below:
Create custom build number during build
With Team Build you can update the build number at any time during the
build by outputing "##vso[build.updatebuildnumber]1.2.3.4" to the log
during the build.
You can see the full list of logging commands here https://github.com/Microsoft/vso-agent-tasks/blob/master/docs/authoring/commands.md
This will update the build number & name.
The down side that you have run into is that you can no longer use the
auto-incrementing number that you have been trying to use. You need to
come up with the version number yourself, and then pass it back using
the output above.
Source
Add two more related blogs:
vNext Build Awesomeness – Managing Version Numbers
Generate custom build numbers in TFS Build vNext
We are using TFS and the TFS Build Service. We are considering to migrate the Build service to Jenkins but we came across some issues. According to this site, there are some things that do not work very well with the TFS and Jenkins plugins. All of them we use a lot:
Associated Change sets – Team Build automatically associates a list of change sets that are included in the build
Associated Work Items – Team Build analysis the relationships and also associates Work Items with a build. Indeed it walks the work item tree (parent) and maintains that association in the chain.
Is this still true? We have this scenario:
A developer checks in a code that fix a bug or resolve a User Story. It does that by associating his check in with the work item ID.
His check in triggers a build that will associate the work item with his changeset. For bugs, the build will update the "Integrated in Build" field with the build number. We use this field to know in witch version the bug was fixed.
Is there any way to make Jenkins behave and do what TFS build service does?
Another option is to mix the two using dummy builds on the TFS side that set the records straight and kick-off the Jenkins' builds. Some hints
How to trigger Jenkins builds remotely and to pass parameters and “Fake” a TFS Build.
This approach requires a bit of effort but has many advantages:
No big-bang, use Jenkins opportunistically
Can continue using existing builds
Having a build identifier in TFS allows you an overall monitoring and to use the Test features
I have a VSTS build definition for one of our projects that requires jenkins to build, but we still have all our other products using VSTS natively. To maintain consistency, this build definition triggers a jenkins build. We configured the build definition to not sync code as jenkins will download it (save time) and not to publish the artifacts back to the agent (i have another script for that found here). This allows developers to continue to use git as normal, and the build/release process is consistent with our other products. Along with task tracking and such.
So here's the setup we have right now
1) We use TFS2013 for our code repository
2) We use TeamCity to do our builds
3) we have our tests created in CodedUI
From what I've read online is that for the CodedUI tests to run automatically, they need a build to reference. However, since we are using Team City to do the builds, our Build Explorer in TFS is empty. Switching off of Team City for builds is a no, so I'm trying to find a way to have the builds appear in the Build Explorer so I can have the automated tests run via MTM.
TL;DR: I need to get the Team City builds to appear in the TFS Build Explorer.
I saw this question, but it was for 2010, so I'm hoping it's changed since How do I make a TeamCity build appear in the TFS Build Explorer?
It can be done using the API. You could use the following blog post as a starting point to create an app that records in TFS the results from your TeamCity build. Then you could run your app as part of your TeamCity build.
http://blogs.msdn.com/b/jpricket/archive/2010/02/23/creating-fake-builds-in-tfs-build-2010.aspx
Update: There are however downsides. Some capabilities of ALM are only available if the build is done in TFS. You loose Test Impact Analysis, relationships between builds and Work Items, identification of Verifiable Bug fixes, roll up for release management of release contents.
TF Build is more than just orchestrating a compilation, it is the glue that knits your ALM strategy together and you will not be able to amortize the realm value in TFS without builds in TF Build or a whole lot of custom work.
Sorry, it's not possible. Team Explorer is designed to show you Team Builds.
I maintain our build process on our TFS 2012 system.
Up till now I've been making changes locally to a solution that generates our custom activity DLLs. These DLLs are checked into TFS and are used by the build controllers and agents for the custom activities in our custom build template.
For all of my code and workflow activities I have a unit test library that I can locally run to put in some base test values. While this gives me a good idea at how my custom tasks will run it is not optimal.
What I would like to be able to do is run the entire build definition. Is there a way to test the whole build process locally so that I can be sure that my changes to the workflow are acceptable before checking in and kicking off a build? Right now my builds take between 30 and 40 minutes to complete and I would like to be able to start, monitor, debug, and stop the build locally without occupying one of our agents.
Edit
Another method for me to solve this problem is to come up with some manner to execute the workflow that is the build template locally. Has anyone been able to do this?
Take a look at the Ranger Build Customization Guidance. There is a HOL for doing a lot of this. It doesn't look like it is in v2 so take a look at v1.2.
http://vsarbuildguide.codeplex.com/releases/view/87995
If I am understanding the issue correctly, one way to do this may be:
Install a build agent locally and register it with the TFS Build Controller.
Give the new agent a custom tag so it doesn't get assigned other builds from the queue
Shelve your changeset
In VS, right click the build definition you want, and select queue new build. A "Queue Build" window will open
Under the general tab, "What do you want to build", select your shelveset.
Under Parameters tab ->Advanced -> agent settings, enter your agent's tag.
Click queue.
I accomplish this using a modified version of #malexander recommendation.
Create a code branch in TFS, commit your changes there, especially the changes to your custom activity DLL's (compiled binaries, not just source).
Install a TFS Build Controller and Build Agent locally, registering the controller with your TFS server.
Configure your new local controller to use your modified custom activity DLL's, stored in your new TFS code branch. Team Explorer > Builds > Actions > Manage Build Controllers >
(select your new local controller) > Properties > Version control
path to custom assemblies
4.
Queue a new build, from an existing TFS build definition: change its controller to use your new local controller.
The new build will execute on your local controller/agent, using your modified custom activity DLL's, without interfering/restarting your production agents.
Also: since you're in your own code branch, you can commit debug versions of your custom activity DLL's, without impacting your production agents.
I have just upgraded our TFS 2008 to TFS 2010. We have a few project areas in our source control and in 2008 they all seemed to have their own build queue, i.e. we could have 2 builds going on if there were in different projects.
However in 2010 there seems to be only one queue. If i queue a build in project A and there is already a build going on in Project B, the Project A build wont start until Project B's build completes.
Can anyone shed any light on this matter?
Is it a configuration/setup issue that can be altered?
In TFS2010, each Collection has a Build Controller associated to it. Each build controller can have 1 or multiple build agents running your builds. So you can build multiple solutions in parallel, just the setup of the build environment is more advanced and scalable than in previous releases.
Take a look at this : TFS Team Build 2010: What’s New?