-
Notifications
You must be signed in to change notification settings - Fork 2.6k
/
Copy pathtask.json
190 lines (190 loc) · 8.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
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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
{
"id": "E28912F1-0114-4464-802A-A3A35437FD16",
"name": "Docker",
"friendlyName": "Docker",
"description": "Build or push Docker images, login or logout, start or stop containers, or run a Docker command",
"helpUrl": "https://aka.ms/azpipes-docker-tsg",
"helpMarkDown": "[Learn more about this task](https://go.microsoft.com/fwlink/?linkid=848006) or [see the Docker documentation](https://docs.docker.com/)",
"category": "Build",
"visibility": [
"Build",
"Release"
],
"author": "Microsoft Corporation",
"version": {
"Major": 2,
"Minor": 240,
"Patch": 2
},
"minimumAgentVersion": "2.172.0",
"demands": [],
"releaseNotes": "Simplified the task YAML by:<br/> - Removing the Container registry type input<br/> - Removing complex inputs as they can be passed as arguments to the command.",
"groups": [
{
"name": "containerRepository",
"displayName": "Container Repository",
"isExpanded": true
},
{
"name": "commands",
"displayName": "Commands",
"isExpanded": true
}
],
"inputs": [
{
"name": "containerRegistry",
"type": "connectedService:dockerregistry",
"label": "Container registry",
"groupName": "containerRepository",
"helpMarkDown": "Select a Docker registry service connection. Required for commands that need to authenticate with a registry."
},
{
"name": "repository",
"label": "Container repository",
"type": "string",
"helpMarkDown": "Name of the repository.",
"defaultValue": "",
"visibleRule": "command != login && command != logout && command != start && command != stop",
"groupName": "containerRepository",
"properties": {
"EditableOptions": "True"
}
},
{
"name": "command",
"type": "pickList",
"label": "Command",
"defaultValue": "buildAndPush",
"required": true,
"options": {
"buildAndPush": "buildAndPush",
"build": "build",
"push": "push",
"login": "login",
"logout": "logout",
"start": "start",
"stop": "stop"
},
"properties": {
"EditableOptions": "True"
},
"groupName": "commands",
"helpMarkDown": "Select a Docker command."
},
{
"name": "Dockerfile",
"type": "filePath",
"label": "Dockerfile",
"defaultValue": "**/Dockerfile",
"required": true,
"visibleRule": "command = build || command = buildAndPush",
"groupName": "commands",
"helpMarkDown": "Path to the Dockerfile."
},
{
"name": "buildContext",
"type": "filePath",
"label": "Build context",
"defaultValue": "**",
"visibleRule": "command = build || command = buildAndPush",
"groupName": "commands",
"helpMarkDown": "Path to the build context. Pass ** to specify the directory that contains the Dockerfile."
},
{
"name": "tags",
"type": "multiLine",
"defaultValue": "$(Build.BuildId)",
"properties": {
"resizable": "true",
"rows": "2"
},
"visibleRule": "command = build || command = push || command = buildAndPush",
"label": "Tags",
"groupName": "commands",
"helpMarkDown": "A list of tags in separate lines. These tags are used in build, push and buildAndPush commands. Ex:<br><br>beta1.1<br>latest"
},
{
"name": "arguments",
"type": "string",
"visibleRule": "command != login && command != logout && command != buildAndPush",
"label": "Arguments",
"groupName": "commands",
"helpMarkDown": "Docker command options. Ex:<br> For build command,<br>--build-arg HTTP_PROXY=http://10.20.30.2:1234 --quiet"
},
{
"name": "addPipelineData",
"type": "boolean",
"label": "Add Pipeline metadata to image(s)",
"groupName": "commands",
"defaultValue": "true",
"helpMarkDown": "By default pipeline data like source branch name, build id are added which helps with traceability. For example you can inspect an image to find out which pipeline built the image. You can opt out of this default behavior by using this input."
},
{
"name": "addBaseImageData",
"type": "boolean",
"label": "Add base image metadata to image(s)",
"groupName": "commands",
"defaultValue": "true",
"helpMarkDown": "By default base image data like base image name and digest are added which helps with traceability. You can opt out of this default behavior by using this input."
},
{
"name": "container",
"type": "string",
"visibleRule": "command = start || command = stop",
"label": "Container",
"groupName": "commands",
"helpMarkDown": "Name of the container. For use with start and stop commands."
}
],
"dataSourceBindings": [],
"outputVariables": [
{
"name": "DockerOutput",
"description": "The path of the file(s) which contains the output of the command. This contains two file paths (separated by newline characters) in case of buildAndPush command, and one file path for any other command."
}
],
"instanceNameFormat": "$(command)",
"showEnvironmentVariables": true,
"execution": {
"Node10": {
"target": "docker.js"
},
"Node16": {
"target": "docker.js"
}
},
"messages": {
"AddingNewAuthToExistingConfig": "Adding auth data for registry to Docker config file. Registry: %s.",
"ConnectingToDockerHost": "DOCKER_HOST variable is set. Docker will try to connect to the Docker host: %s",
"CommandNotRecognized": "Command not recognized: %s",
"ContainerPatternFound": "Pattern found in Docker filepath parameter",
"ContainerPatternNotFound": "No pattern found in Docker filepath parameter",
"ContainerDockerFileNotFound": "No Dockerfile matching %s was found.",
"CantWriteDataToFile": "Can not write data to the file %s. Error: %s",
"CouldNotFindDockerConfig": "Could not find Docker Config. Either DOCKER_CONFIG variable is not set, or the config file is outside the temp directory, or the file does not exist. DOCKER_CONFIG: %s",
"MSIFetchError": "Could not fetch access token for Managed Service Principal. Please configure Managed Service Identity (MSI) for virtual machine 'https://aka.ms/azure-msi-docs'. Status code: %s, status message: %s",
"DockerHostVariableWarning": "DOCKER_HOST variable is set. Please ensure that the Docker daemon is running on: %s",
"DeletingDockerConfigDirectory": "Deleting Docker config directory. Path: %s",
"DeletingAuthDataFromDockerConfig": "Deleting auth data for registry from Docker config file. Registry: %s, New Docker config: %s",
"DockerRegistryNotFound": "Docker registry service connection not specified.",
"ErrorParsingDockerConfig": "Could not parse the Docker config obtained from the file. Error: %s",
"FileContentSynced": "Synced the file content to the disk. The content is %s.",
"FoundDockerConfigStoredInTempPath": "Found the Docker Config stored in the temp path. Docker config path: %s, Docker config: %s",
"FoundLoginsForOtherRegistries": "Found login info for other registry(s). Trying to remove auth from the Docker config for the registry: %s",
"IgnoringArgumentsInput": "The arguments input is not supported when the command is buildAndPush. Ignoring the input.",
"LoggingOutFromRegistry": "Trying to logout from registry: %s",
"LoggingOutWithNoRegistrySpecified": "Logging out. Removing all auth data from temp docker config, since no registry is specified.",
"NoAuthInfoFoundInDockerConfig": "No auths found in Docker config. Hence returning 0 registry url's.",
"NoDataWrittenOnFile": "No data was written into the file %s",
"NoImagesInImageNamesFile": "At least one image name is expected in file '%s'.",
"NotAddingAnyTagsToBuild": "Not adding any tags to the built image as no repository is specified.",
"NotPushingAsNoLoginFound": "Not pushing to any registry as no login information was found.",
"OldDockerConfigContent": "Found an earlier login to the same registry. Saving old auth data and continuing with the new login. Old docker config: %s",
"OutputVariableDataSizeExceeded": "Output variable not set as Docker command output exceeded the maximum supported length. Output length: %s, Maximum supported length: %s",
"PathIsNotInTempDirectory": "The config path is not inside the temp directory. Config path: %s, Temp directory: %s",
"RegistryAuthNotPresentInConfig": "Could not find the auth data for registry in the Docker config file. Nothing to be done to logout. Registry: %s",
"RestoringOldLoginAuth": "Restoring the previous login auth data for the registry: %s",
"WritingDockerConfigToTempFile": "Writing Docker config to temp file. File path: %s, Docker config: %s"
}
}