Reputation: 195
I want to implement a custom build task in Azure DevOps for my project. We have for each environment an own subscriptions and one environment-independent subscription. The new task should have the environment-independent one as default.
Here is the relevant code from the task.json.
"inputs": [
{
"name": "ConnectedServiceName",
"type": "ConnectedService:AzureRM",
"label": "Azure Subscription",
"required": true,
"defaultValue": "4893b32-2345-ab54-b13d-1294cab34",
"groupName": "CredentialsSelection"
},
The problem is, that the service endpoint id, which I have specified is ignored. The same behavior occurs, if I specify the name of the service connection endpoint. Does anybody know if there is a way to specify the default value?
Upvotes: 1
Views: 575
Reputation: 195
Now, it was possible to set the default value by using the service connection id. The task needed some time to make the changes available. I don't know why, because I deleted the task before I deployed the new version. But now it works.
As D.J. mentioned, a default value only makes sense if the task is internal and only used within an organization.
Upvotes: 1