none
Creating build/release task extension Databindings RRS feed

  • Question

  • Hi,

    Recently I started trying to create my own release extentsion. When doing so i ran into some trouble creating a datasourcebinding. When running the following code the project gives a list of all the names. For release however I get no results.

    "dataSourceBindings": [ { "endpointId": "tfs:teamfoundation", "target": "project", "endpointUrl": "{{endpoint.url}}/_apis/projects?$skip={{skip}}&$top=1000", "resultSelector": "jsonpath:$.value[?(@.state=='wellFormed')]", "resultTemplate": "{ \"Value\" : \"{{{id}}}\", \"DisplayValue\" : \"{{{name}}}\" }", "callbackContextTemplate": "{\"skip\": \"{{add skip 1000}}\"}", "callbackRequiredTemplate": "{{isEqualNumber result.count 1000}}", "initialContextTemplate": "{\"skip\": \"0\"}" }, { "endpointId": "tfs:rm", "target": "release", "endpointUrl": "{{endpoint.url}}/{{project}}/_apis/release/definitions?api-version=4.1-preview&$top=500&continuationToken={{{continuationToken}}}&queryOrder=nameDescending", "parameters": { "project": "$(project)" }, "resultSelector": "jsonpath:$.value[*]", "resultTemplate": "{ \"Value\" : \"{{{id}}}\", \"DisplayValue\" : \"{{{name}}}\" }", "callbackContextTemplate": "{\"continuationToken\" : \"{{{headers.x-ms-continuationtoken}}}\"}", "callbackRequiredTemplate": "{{{#headers.x-ms-continuationtoken}}}true{{{/headers.x-ms-continuationtoken}}}", "initialContextTemplate": "{\"continuationToken\" : \"{{{system.utcNow}}}\"}" }

    According to https://blogs.msdn.microsoft.com/sriramb/2018/02/20/data-source-bindings-for-tfsvsts-rest-apis/ tfs:rm should work for release but i canont get any definitions. When using the rest api https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/definitions?api-version=5.0

    I do get the response i desire.

    Can someone help me get this working? thanks alot.

    Monday, July 1, 2019 7:35 PM

Answers

  • will do for others intereseted: https://developercommunity.visualstudio.com/content/problem/630350/creating-buildrelease-task-extension-databindings.html


    Tuesday, July 2, 2019 10:36 AM

All replies