I am trying to start a build from Powershell using the TFS 2015 REST API. I am sucessful in starting a new build using REST API after following the Post.
Now i am trying to pass some custom parameter that appears in the Build def parameter through the REST API.
I am not sure whether it can be done, if anyone has any previous knowledge please help.
I am using TFS 2015 and XAML based build.
There is an optional option with REST API for querying build called parameters :Parameters to pass to the build. This is optional. If not specified, the default variables for the definition will be used.
Example:
"parameters": "{\"system.debug\":\"true\",\"BuildConfiguration\":\"debug\",\"BuildPlatform\":\"x64\"}"
More details please refer the document from MSDN: Builds
Related
I'm developing a custom interface which will integrate with OpenShift Origins. At the moment, I have templates which I wish to instantiate. I know I can do this by running the template against the /processtemplate end-point. However, the only way I can find for setting the template parameters is to iterate through the parameter list and overwrite the fields manually.
Is it possible to send a parameter list, and have OpenShift run it against the template, or is this the only solution?
We do not have something like that today - it might be exposed in the future via a /templates/foo/process endpoint supporting form post, but we were hesitant in case we wanted to expose more complicated parameter values in the future.
Is it possible, through the rest API, to request all the builds with a specific tag? Along the same lines, can I get all the builds from a specific time period? For example, request the builds from 7 am to 7 pm of a specific date?
Background, I am trying to automatically pin builds based on a parameter. I had a custom script that used the rest api to pin builds and I used this script in a command line build step. The problem is, TeamCity won't allow you to pin a build that is in progress. So to get around this I am trying to do the following: I have a build step that uses a custom script to tag a build, then the idea is that I will have a script that I will run every night or so that grabs all the tagged builds, or builds from a specific time period and pin them.
Any other ideas are welcome as well.
Please do a request to:
https://{yourdomain}/app/rest/builds?locator=tag:your-tag
That's it.
From the rest API documentation: https://confluence.jetbrains.com/display/TCD10/REST+API#RESTAPI-BuildRequests
you can use the ?locator=tag:<tagName> tag to get all the builds with a specific tag name.
Am getting following error while adding standard process templates.
FYI, we upgraded to TFS 2015 from TFS 2013. This projects have customized workitems in TFS 2013.
TF400917: The current configuration is not valid for this feature. This feature cannot be used until you correct the configuration.
Learn about how to correct your configuration
Details about the validation error appear below:
The following element contains an error: PortfolioBacklog(Microsoft.FeatureCategory). TF400522: The following value is not a valid work item category: Microsoft.FeatureCategory. You must specify a valid category.
The following element contains an error: RequirementBacklog. TF400522: The following value is not a valid work item category: Microsoft.FeatureCategory. You must specify a valid category.
The following element contains an error: TaskBacklog. TF400522: The following value is not a valid work item category: Microsoft.TaskCategory. You must specify a valid category.
Thanks in advance
If you just add custom WITs and change the form layout. The Configure Features Wizard will update your team projects and you’ll get access to the latest features.
If you change the workflow or renaming a WIT,then it might require you to perform some manual operations when updating your team project.
More information, see Maintenance and upgrade implications (TFS).
Does anyone know how to create a branch using the VSO Api. The documentation for Branches doesn't include a "create".
I have been experimenting with doing it via the ChangeSet Api without much success.
This is TFVC, not Git.
Just as what you see in "Branches" page, there isn't any way to create branch with the Rest API. And mostly, you can only read/get the information with the Version Control API for now.
I would recommend you to use Client Object Model Reference if you want to manage the Version Control programmatically. To create a branch, use the "CreateBranch()" method in Microsoft.TeamFoundation.VersionControl.Client.VersionControlServer class.
The REST API apparently does allow one to create branches.
The confusion is that people think that this would be a PUT operation on the Branches endpoint of some kind.
It is not.
In the REST API, a branch is just one more kind of change that is checked in as part of a changeset.
It took me a long time to discover this, myself; and I was using the old SOAP API in the belief, shared by everyone else it appears from what I can find in Q&As on the WWW, that this wasn't part of the REST API.
Of course, using the SOAP API prohibits using .NET 5, because the assemblies only come for .NET Framework.
An abandonware API on an abandonware runtime is not a satisfactory way to talk to source control. ☺
The terrible Azure DevOps documentation gives no clue as to this, except for 1 obscure not-even-a-complete-sentence hidden in a minor class: "List of merge sources in case of rename or branch creation."
The only other clue is what appears in the JSON, from a get changeset changes, that describes the changeset of an already-made branch.
The (also abandoned) Azure DevOps sample code does not contain examples for even deleting an item, let alone branching.
Changesets are checked in via the changeset creation endpoint.
The individual change is a TfvcChange in the changeset's list of changes where:
the version control type (which is a set of flags) contains the branch flag; and
the merge source for the change specifies the source item and the range of changeset numbers.
Branching an entire tree appears to be a matter of branching the directory and all of the files and directories in the directory.
In C♯ or PowerShell, this is a TfvcChange with a VersionControlChangeType of Branch, in a TfvcChangeset passed to TfvcHttpClientBase.CreateChangesetAsync().
I have the need to add a licence field to the APIs published by the API manager.
It does not seems to be any extension point beyond the api.rxt file in the resource folder.
If I modify the file and run the application the carbon app correctly show the added field, but nor the publishe nor the store are able to get the field and there is no way to get it also with REST APIs since it calls a method of a class that (in later versions) outputted fields positionally.
Is it possible to add the field, without running the risk of crashing the API Manager?
Which is the correct way?
Thanks
This change cannot be done without modifying the code. When an API is created from the Publisher app, it gets stored in the registry. The api.txt you modified, only defines the structure of this stored artifact. It may add a new field to the artifact, but to correctly populate that field, you need to modify several methods in APIProviderHostObject and APIProviderImpl + several Jaggery scripts.