I'm developing VSTS plugin in Javascript. As part of it, I need to build and run a task on any agent.
The flow is: Run build -> Wait the build to finish -> Click on a button -> Another different task is built and run.
I found a build REST client that create build definitions and queue builds.
I didn't find any examples nor any detailed documentation. Does anyone have a simple example that creates and runs a new build definition using that build REST client?
There's already such extensions to queue/trigger build tasks in Marketplace.
You can refer to below link to get the extensions:
Queue Build(s) Task
Trigger Build Task
If you want to develop your own extension, then you can reference the source code of the extension Trigger Build Task on GitHub
Related
I'm attempting to set up a Xamarin iOS build on an internally hosted TFS 2015 build server. We have been working with this for a few months now and have used many of the contributed build tasks on GitHub and written a couple of our own.
So far we have only used tasks written using NodeJs and PowerShell. The Xamarin.iOS task is written using TypeScript and it seems our build agents don't have the required handler for this. We get this error when trying to run a build.
The definition for the task does not have a handler that matches any supported by this agent. Supported handlers: AzurePowerShell, AzurePowerShellHandler, PowerShell, PowerShellHandler, PowerShellExe, PowerShellExeHandler, Process, ProcessHandler
I'm not sure how to add this capability to the agents. Can anyone help?
Xamarin.iOS build task requires a Mac OS build agent, refer to this link for the configuration: Xplat build agents
Another reference may help: http://developer.xamarin.com/guides/cross-platform/ci/configuring_tfs/
I have managed to chain two TFS builds together using Jason Stangroome's chaining build definition template. This gives me the capacity to execute one build definition after the next:
CertificateRepository-CI (Continuous Integration Build)
CertificateRepository-IntegrationTests
The latter will automatically be executed if the former is successful. I am stumped by the lack of Build Definition Templates that are able to download and extract the contents of the preceding build's drop folder and perform actions upon these artifacts, in this case running SpecFlow/NUnit integration tests.
In this case I am using:
Visual Studio Online
Git for the codebase being tested
TFVC for the ALM components (NUnit Adapter, Build Definition Templates)
Any help greatly appreciated.
If you are using TFS for source control: I don't have a template for this but you can follow below steps to achieve this.
In CI build set the Staging Location option to Copy buildoutput to following Source Control folder
Download the drop folder by mapping it in source settings option
in build definition
Under drop location folder in TFS, every CI build will create a new folder, you need to pass this folder name to the second build definition. Please check another post from Jason for passing parameters to second build
Execute the tests by invoking the commandline tools using Invoke
Process activity.
We want to create a TFS Build Template only to trigger my power shell script for deployment.
We do not want to build any project or solution as part of this process definition.
We tried editing the process template workflow and removed build related actions but still when I open the edit process template I am prompted to provide project to build in Build section.
We do not want to include our deployment script in any other build definitions as we want to decouple deployment and configure separately.
I have seen some similar questions in StakOverflow but those suggestion are create some fake projects or fake solutions to attach it. But I am looking for completely removing the build section from the build definition.
Remove the workflow arguments that you don't require when editing the workflow (specifically the BuildSettings argument).
I am trying to build my solution at the TFS2010, after successfull build, I am trying to make TFS2010 run another application, like VS Post-build event.
It can be possible? and How can I make It?
What you probably need to do is add an activity to your process template for your build.
In your build configuration, the Process area allows you to specify the template that will be used to execute the build. This XAML file should already be source controlled in your TFS project. You can create a new XAML based on your current one, or if you have already created your own just check out your XAML and edit it.
I'm not familiar with DBDeploy or how to invoke it, but if it has command-line arguments you can likely add an InvokeProcess activity to your build workflow and execute a Powershell command script to do what you need to add after the build.
Basically, I have 2 build definitions, one builds and deploys some database projects, and the other builds and deploys a website.
What I would like to do is be able to build/deploy the databases, and if that doesn't have any errors, build and deploy the web app.
The idea being that if database deploy fails for some reason, I can restore the database from a backup and fix the issue before I deploy the web app. (Leaving the previous version of the app working)
Any info on how to invoke my database build definition, from within my web app build def would be appreciated.
Download the Community TFS Build Extensions, it contains the Queue Build custom activity which you use (or) you can call TFSBuild Commandline tool by using Invoke Process Activity.