/
task.json
117 lines (117 loc) · 3.69 KB
/
task.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
{
"id": "BA761F24-CBD6-48CB-92F3-FC13396405B1",
"name": "PublishToAzureServiceBus",
"friendlyName": "Publish To Azure Service Bus",
"description": "Sends a message to azure service bus using a service connection (no agent required).",
"category": "Utility",
"helpMarkDown": "[More Information](https://go.microsoft.com/fwlink/?linkid=870237)",
"visibility": [
"Build",
"Release"
],
"runsOn": [
"Server"
],
"author": "Microsoft Corporation",
"version": {
"Major": 1,
"Minor": 0,
"Patch": 6
},
"groups": [
{
"name": "signingDetails",
"displayName": "Signing Properties",
"isExpanded": false
}
],
"inputs": [
{
"name": "connectedServiceName",
"aliases": ["azureSubscription"],
"type": "connectedService:AzureServiceBus",
"label": "Azure service bus connection",
"defaultValue": "",
"required": true,
"helpMarkDown": "Select a Azure Service Bus connection."
},
{
"name": "messageBody",
"type": "multiLine",
"label": "Message body",
"required": false,
"defaultValue": "",
"helpMarkDown": "Enter the json messageBody.",
"properties": {
"resizable": "true",
"rows": "10",
"maxLength": "5000",
"editorExtension": "ms.vss-services-azure.azure-servicebus-message-grid"
}
},
{
"name": "signPayload",
"type": "boolean",
"label": "Sign the Message",
"defaultValue": "false",
"required": true,
"helpMarkDown": "If this is set to true, message will be signed provided a private certificate.",
"groupName": "signingDetails"
},
{
"name": "certificateString",
"type": "string",
"label": "Certificate Variable",
"required": true,
"defaultValue": "",
"helpMarkDown": "Specify the secret variable that contains the certificate content.",
"visibleRule": "signPayload = true",
"groupName": "signingDetails"
},
{
"name": "signatureKey",
"type": "string",
"label": "Signature Property Key",
"required": false,
"defaultValue": "signature",
"helpMarkDown": "Key where you want signature to be in Message Properties. If left Empty, default is 'signature' in message properties",
"visibleRule": "signPayload = true",
"groupName": "signingDetails"
},
{
"name": "waitForCompletion",
"type": "boolean",
"label": "Wait for task completion",
"defaultValue": "false",
"required": true,
"helpMarkDown": "If this is true, this task will wait for TaskCompleted event for the specified task timeout."
}
],
"instanceNameFormat": "Publish to Azure Service Bus",
"execution": {
"ServiceBus": {
"events": {
"taskCompleted": { "enabled": "$(waitForCompletion)" }
},
"execute": {
"endpointId": "$(connectedServiceName)",
"connectionString": "$(endpoint.serviceBusConnectionString)",
"serviceBusQueueName": "$(endpoint.serviceBusQueueName)",
"messageBody": "$(messageBody)",
"certificateString": "{{#notEquals signPayload 'false' 1}}{{#notEquals endpoint.signPayload 'false' 1}}$(certificateString){{/notEquals}}{{else}}{{/notEquals}}",
"signaturePropertyKey": "$(signatureKey)",
"messageProperties": {
"PlanUrl": "$(system.CollectionUri)",
"ProjectId": "$(system.TeamProjectId)",
"HubName": "$(system.HostType)",
"PlanId": "$(system.PlanId)",
"JobId": "$(system.JobId)",
"TimelineId": "$(system.TimelineId)",
"TaskInstanceName": "$(system.TaskInstanceName)",
"TaskInstanceId": "$(system.TaskInstanceId)",
"AuthToken": "$(system.AccessToken)"
}
}
}
}
}