-
Notifications
You must be signed in to change notification settings - Fork 2.6k
/
Copy pathtask.json
171 lines (171 loc) · 5.97 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
163
164
165
166
167
168
169
170
171
{
"id": "91443475-df55-4874-944b-39253b558790",
"name": "SSH",
"friendlyName": "SSH",
"description": "Run shell commands or a script on a remote machine using SSH",
"helpUrl": "https://docs.microsoft.com/azure/devops/pipelines/tasks/deploy/ssh",
"helpMarkDown": "[Learn more about this task](http://go.microsoft.com/fwlink/?LinkId=821892)",
"category": "Deploy",
"visibility": [
"Build",
"Release"
],
"runsOn": [
"Agent",
"DeploymentGroup"
],
"author": "Microsoft Corporation",
"version": {
"Major": 0,
"Minor": 247,
"Patch": 0
},
"demands": [],
"minimumAgentVersion": "2.206.1",
"instanceNameFormat": "Run shell $(runOptions) on remote machine",
"groups": [
{
"name": "advanced",
"displayName": "Advanced",
"isExpanded": false
}
],
"inputs": [
{
"name": "sshEndpoint",
"type": "connectedService:ssh",
"label": "SSH service connection",
"defaultValue": "",
"required": true,
"helpMarkDown": "SSH service connection with connection details for the remote machine."
},
{
"name": "runOptions",
"type": "radio",
"label": "Run",
"required": true,
"defaultValue": "commands",
"options": {
"commands": "Commands",
"script": "Script File",
"inline": "Inline Script"
},
"helpMarkDown": "Choose to either run shell commands or a shell script on the remote machine."
},
{
"name": "commands",
"type": "multiLine",
"label": "Commands",
"defaultValue": "",
"required": true,
"visibleRule": "runOptions = commands",
"helpMarkDown": "Specify the shell commands to run on the remote machine. Enter each command along with its arguments on a new line. To run multiple commands together, enter them on the same line separated by semi-colons (e.g. cd /home/user/myFolder;build).",
"properties": {
"resizable": "true",
"rows": "10"
}
},
{
"name": "scriptPath",
"type": "filePath",
"label": "Shell script path",
"defaultValue": "",
"required": true,
"visibleRule": "runOptions = script",
"helpMarkDown": "Path to the shell script file to run on the remote machine."
},
{
"name": "inline",
"type": "multiLine",
"label": "Inline Script",
"defaultValue": "",
"required": true,
"visibleRule": "runOptions = inline",
"helpMarkDown": "Write the shell script to run on the remote machine.",
"properties": {
"resizable": "true",
"rows": "10"
}
},
{
"name": "interpreterCommand",
"type": "string",
"label": "Interpreter command",
"defaultValue": "/bin/bash",
"required": false,
"visibleRule": "runOptions = inline",
"helpMarkDown": "Path to the command interpreter used to execute the script. Adds a shebang line to the beginning of the script. Relevant only for UNIX-like operating systems. Please use empty string for Windows-based remote hosts. [See more about shebang (#!)](https://homepages.cwi.nl/~aeb/std/shebang/unix-faq.txt)"
},
{
"name": "args",
"type": "string",
"label": "Arguments",
"defaultValue": "",
"required": false,
"visibleRule": "runOptions = script",
"helpMarkDown": "Arguments to pass to the shell script."
},
{
"name": "failOnStdErr",
"type": "boolean",
"label": "Fail on STDERR",
"required": false,
"defaultValue": true,
"helpMarkDown": "If this option is selected, the build will fail when the remote commands or script write to STDERR.",
"groupName": "advanced"
},
{
"name": "interactiveSession",
"type": "boolean",
"label": "Enable interactive session",
"required": false,
"defaultValue": false,
"helpMarkDown": "If this option is selected, interactive session will be started - if there's a password request, it will be filled by user's password. It could be useful to run commands like 'sudo'",
"groupName": "advanced"
},
{
"name": "readyTimeout",
"type": "string",
"label": "SSH handshake timeout",
"defaultValue": "20000",
"required": true,
"groupName": "advanced",
"helpMarkDown": "How long (in milliseconds) to wait for the SSH handshake to complete.",
"validation": {
"expression": "isMatch(value, '(^\\d*$)','Multiline')",
"message": "Enter a valid value for timeout."
}
},
{
"name": "interactiveKeyboardAuthentication",
"type": "boolean",
"label": "Use interactive-keyboard authentication",
"defaultValue": false,
"required": false,
"groupName": "advanced",
"helpMarkDown": "Use this value if PasswordAuthentication is disabled on the target machine"
}
],
"execution": {
"Node16": {
"target": "ssh.js",
"argumentFormat": ""
}
},
"messages": {
"ConnectionFailed": "Failed to connect to remote machine. Verify the SSH service connection details. Error: %s.",
"FailedToWriteScript": "Failed to write the script to disk: %s",
"RemoteCmdExecutionErr": "Command failed with errors on remote machine.",
"RemoteCmdNonZeroExitCode": "Command %s exited with code %s.",
"RemoteCopyFailed": "Failed to copy script to remote machine. Error: %s.",
"RemoteScriptFileCleanUpFailed": "Failed to delete the script file copied to the remote machine. Error = %s.",
"SettingUpSshConnection": "Trying to establish an SSH connection to %s@%s:%s",
"SshConnectionSuccessful": "Successfully connected.",
"UseDefaultPort": "Using port 22 which is the default for SSH since no port was specified.",
"ScriptArgsSanitized": "Detected characters in arguments that may not be executed correctly by the shell. Please escape special characters using backslash (\\). More information is available here: https://aka.ms/ado/75787"
},
"_buildConfigMapping": {
"Default": "0.247.0",
"Node20-225": "0.247.1"
}
}