/
task.json
162 lines (162 loc) · 5.26 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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
{
"id": "5c9af2eb-5fc5-42dc-9b91-dc234a8c4400",
"name": "InstallSSHKey",
"friendlyName": "Install SSH key",
"description": "Install an SSH key prior to a build or deployment",
"helpUrl": "https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/install-ssh-key",
"helpMarkDown": "[Learn more about this task](https://go.microsoft.com/fwlink/?linkid=875267)",
"category": "Utility",
"visibility": [
"Build",
"Release"
],
"author": "Microsoft Corporation",
"version": {
"Major": 0,
"Minor": 211,
"Patch": 0
},
"runsOn": [
"Agent",
"DeploymentGroup"
],
"demands": [],
"minimumAgentVersion": "2.182.1",
"instanceNameFormat": "Install an SSH key",
"groups": [
{
"name": "advanced",
"displayName": "Advanced",
"isExpanded": false
}
],
"inputs": [
{
"name": "hostName",
"aliases": [
"knownHostsEntry"
],
"type": "multiLine",
"label": "Known Hosts Entry",
"defaultValue": "",
"required": true,
"helpMarkDown": "The entry for this SSH key for the known_hosts file. Supports several hosts."
},
{
"name": "sshPublicKey",
"type": "string",
"label": "SSH Public Key",
"defaultValue": "",
"required": false,
"helpMarkDown": "The contents of the public SSH key. If not specified it will be generated out of private key."
},
{
"name": "sshPassphrase",
"type": "string",
"label": "SSH Passphrase",
"defaultValue": "",
"required": false,
"helpMarkDown": "The passphrase for the SSH key, if any."
},
{
"name": "sshKeySecureFile",
"type": "secureFile",
"label": "SSH Key",
"defaultValue": "",
"required": true,
"helpMarkDown": "Select the SSH key that was uploaded to `Secure Files` to install on the agent."
},
{
"name": "addEntryToConfig",
"type": "boolean",
"label": "Add entry to SSH config",
"defaultValue": false,
"required": false,
"groupName": "advanced",
"helpMarkDown": "Add entry related to the key installed to the SSH config file. The key file will be available for all subsequent tasks."
},
{
"name": "configHostAlias",
"type": "string",
"label": "Alias",
"defaultValue": "",
"required": true,
"visibleRule": "addEntryToConfig = true",
"groupName": "advanced",
"helpMarkDown": "Name of SSH config entry"
},
{
"name": "configHostname",
"type": "string",
"label": "Host name",
"defaultValue": "",
"required": true,
"visibleRule": "addEntryToConfig = true",
"groupName": "advanced",
"helpMarkDown": "Host name property of SSH config entry"
},
{
"name": "configUser",
"type": "string",
"label": "User",
"defaultValue": "",
"required": false,
"visibleRule": "addEntryToConfig = true",
"groupName": "advanced",
"helpMarkDown": "Username property of SSH config entry"
},
{
"name": "configPort",
"type": "string",
"label": "Port",
"defaultValue": "",
"required": false,
"visibleRule": "addEntryToConfig = true",
"groupName": "advanced",
"helpMarkDown": "Port of SSH config entry"
}
],
"prejobexecution": {
"Node10": {
"target": "preinstallsshkey.js",
"argumentFormat": ""
},
"Node16": {
"target": "preinstallsshkey.js",
"argumentFormat": ""
}
},
"postjobexecution": {
"Node10": {
"target": "postinstallsshkey.js",
"argumentFormat": ""
},
"Node16": {
"target": "postinstallsshkey.js",
"argumentFormat": ""
}
},
"restrictions": {
"commands": {
"mode": "restricted"
},
"settableVariables": {
"allowed": [
"SSH_AGENT_PID",
"SSH_AUTH_SOCK",
"INSTALL_SSH_KEY_CONFIG_LOCATION",
"INSTALL_SSH_KEY_KNOWN_HOSTS_LOCATION"
]
}
},
"messages": {
"SSHKeyAlreadyInstalled": "The SSH key is already installed.",
"SSHPublicKeyMalformed": "Could not get the base64 portion of the public SSH key.",
"SSHKeyInstallFailed": "Failed to install the SSH key.",
"CannotResetKnownHosts": "Cannot reset the known_hosts file to its original values.",
"GeneratingPublicKey": "Generating public key out of private one.",
"CannotResetFile": "Cannot reset the %s file to its original values.",
"DeletePrivateKeyFile": "Deleting private key file.",
"InsertingIntoConfig": "Inserting entry into config file:"
}
}