forked from colindembovsky/cols-agent-tasks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtask.json
69 lines (69 loc) · 2.12 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
{
"id": "9240B5C1-A1B2-4799-9325-E071C63236FB",
"name": "ReplaceTokens",
"friendlyName": "Replace Tokens",
"description": "Replaces tokens in a file using RegEx. Values come from any variable defined in the current Environment.",
"author": "Colin Dembovsky (colinsalmcorner.com)",
"helpMarkDown": "[More Information](https://github.com/colindembovsky/cols-agent-tasks/tree/master/Tasks/ReplaceTokens)",
"category": "Utility",
"visibility": [
"Build",
"Release"
],
"version": {
"Major": "0",
"Minor": "0",
"Patch": "15"
},
"groups": [
{
"name": "advanced",
"displayName": "Advanced",
"isExpanded": false
}
],
"minimumAgentVersion": "1.91.0",
"instanceNameFormat": "Replace tokens in $(sourcePath)",
"inputs": [
{
"name": "sourcePath",
"type": "filePath",
"label": "Source Path",
"defaultValue": "",
"helpMarkDown": "Path to the file(s) containing tokens.",
"required": true
},
{
"name": "filePattern",
"type": "string",
"label": "Target File Pattern",
"defaultValue": "*.config",
"helpMarkDown": "File pattern to find in source path. Supports minimatch.",
"required": true
},
{
"name": "tokenRegex",
"type": "string",
"label": "Token Regex",
"defaultValue": "__(\\w+)__",
"helpMarkDown": "Regex to use for token replacement. Must include a group match.",
"required": true,
"groupName": "advanced"
},
{
"name": "secretTokens",
"type": "string",
"label": "Secret Tokens",
"defaultValue": "",
"helpMarkDown": "A configuration variable can be set as 'secret' in release definition to have its value hidden. For tokens need to be replaced with the value of secret configuration variables, they can be specified here using the following format: key1:$(secret1);key2:$(secret2). Non-secret configuration variable do not need to be specified explicitly here.",
"required": false,
"groupName": "advanced"
}
],
"execution": {
"Node": {
"target": "replaceTokens.js",
"argumentFormat": ""
}
}
}