5

I googled last few days to get the list of input types supported by VSTS Task plugin, but don't get anything appropriate.

Is this possible to create Grid in task plugin

Nitin Parashar
  • 227
  • 3
  • 13

3 Answers3

8

At present, there is no way to create a Grid on the task input page. For a complete list of the supported types, take a look at the Reference for creating custom build tasks within extensions for details. This is schema definition for what your custom task JSON needs to conform to. If you look under inputs/items/properties/type you will see these supported types:

  • boolean
  • connectedService:ServiceType
  • connectedService:AzureRM
  • connectedService:Azure
  • connectedService:Azure:Certificate,UsernamePassword
  • connectedService:Chef
  • connectedService:ssh
  • connectedService:Generic
  • connectedService:Jenkins
  • connectedService:servicefabric
  • filePath
  • multiLine
  • pickList
  • radio
  • string
tj-cappelletti
  • 1,774
  • 12
  • 19
2

You can define custom editor experiences using a KnockoutJS-based HTML page (via the vss-web-extension-sdk) and registering it as a ms.vss-distributed-task.task-input-editor contribution in your extension's vss-extension.json.

The vsts-extension-samples repository includes an example of this in release-manageent/editor-extension

Richard Szalay
  • 83,269
  • 19
  • 178
  • 237
  • Maybe you'll know this one as well? https://stackoverflow.com/questions/70834090/azure-pipeline-custom-task-string-input-to-match-regex – CodeMonkey Jan 24 '22 at 14:30
1

In addition, you can create custom endpoint and use in task: connectedService:[endpoint name].

Service Endpoints in VSTS

starian chen-MSFT
  • 33,174
  • 2
  • 29
  • 53
  • No, the endpoint is the connection instead of control for task input box. – starian chen-MSFT Jan 10 '18 at 05:36
  • Thanks a lot for pointing out that the string after ':' is the endpoint name. I spent two hours on investigating why service connections are not listed. – xtu Nov 30 '18 at 15:32
  • I did create a cusotm service endpoint, and using it in task.json, although in my case, I do not want to show users the service endpoint etc in the build task, and thus added a visibility rule which makes it hidden. With everything else as it is, the task is failing. Is there any way I can make the connectedService field in task.json hidden and use a fixed value(which I know) for the same subsequently to fetch client id and password associated with it? – tanmayghosh2507 Apr 15 '19 at 22:38