This repository has been archived by the owner on Aug 5, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathvss-extension.json
291 lines (291 loc) · 8.44 KB
/
vss-extension.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
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
{
"manifestVersion": 1,
"id": "gitlab-integration",
"name": "GitLab Integration for Azure Pipelines",
"publisher": "onlyutkarsh",
"version": "0.0.170",
"public": false,
"description": "Download sources from GitLab repository in your build pipeline or consume them as an artifact in to your release pipeline during deployment.",
"categories": [
"Azure Pipelines"
],
"Tags": [
"GitLab",
"Azure DevOps",
"Azure Pipelines",
"Release",
"DevOps",
"Artifacts",
"Git",
"Build"
],
"repository": {
"type": "git",
"url": "https://github.com/onlyutkarsh/gitlab-integration"
},
"targets": [
{
"id": "Microsoft.VisualStudio.Services"
}
],
"demands": [
"contribution/ms.vss-releaseartifact.artifact-types"
],
"icons": {
"default": "images/gitlab128.png",
"large": "images/gitlab512.png"
},
"branding": {
"color": "#3B3E43",
"theme": "dark"
},
"content": {
"details": {
"path": "readme.md"
}
},
"files": [
{
"path": "tasks"
},
{
"path": "images",
"addressable": "true"
}
],
"contributions": [
{
"id": "gitlab-downloadrepo-task",
"type": "ms.vss-distributed-task.task",
"targets": [
"ms.vss-distributed-task.tasks"
],
"properties": {
"name": "tasks/DownloadRepo"
}
},
{
"id": "gitlab-endpoint-type",
"description": "Service connection type for all GitLab connections",
"type": "ms.vss-endpoint.service-endpoint-type",
"targets": [
"ms.vss-endpoint.endpoint-types"
],
"properties": {
"name": "gitlab",
"icon": "images/gitlab16.png",
"displayName": "GitLab",
"url": {
"displayName": "Server URL",
"value": "https://gitlab.com",
"helpText": "Client service connection for GitLab. You don't need to change this unless you are using self hosted GitLab instance, in which case you may need to point to your instance URL. ",
"isVisible": true
},
"inputDescriptors": [
{
"id": "username",
"name": "Username",
"description": "Username you use to login to GitLab. This is required only to validate your PAT token using 'Verify connection' link below.",
"inputMode": "textbox",
"isConfidential": false,
"validation": {
"isRequired": true,
"dataType": "string"
}
}
],
"dataSources": [
{
"name": "TestConnection",
"endpointUrl": "{{{endpoint.url}}}api/v4/users?username={{{endpoint.username}}}",
"resultSelector": "jsonpath:$[*]"
},
{
"name": "Repositories",
"endpointUrl": "{{{endpoint.url}}}api/v4/projects?membership=true",
"resultSelector": "jsonpath:$[*]"
},
{
"name": "Branches",
"endpointUrl": "{{{endpoint.url}}}api/v4/projects/{{{definition}}}/repository/branches",
"resultSelector": "jsonpath:$[*]"
},
{
"name": "CommitsFromSelectedBranch",
"endpointUrl": "{{{endpoint.url}}}api/v4/projects/{{{definition}}}/repository/commits{{#if branch}}?ref_name={{{branch}}}",
"resultSelector": "jsonpath:$[*]"
},
{
"name": "LatestCommit",
"endpointUrl": "{{{endpoint.url}}}api/v4/projects/{{{definition}}}/repository/commits",
"resultSelector": "jsonpath:$[0]"
},
{
"name": "Artifacts",
"endpointUrl": "{{{endpoint.url}}}api/v4/projects/{{definition}}/repository/tree?path={{itemPath}}&ref={{branch}}",
"resultSelector": "jsonpath:$[*]"
}
],
"authenticationSchemes": [
{
"type": "ms.vss-endpoint.endpoint-auth-scheme-token",
"inputDescriptors": [
{
"id": "apitoken",
"name": "API Token",
"description": "GitLab API Token",
"inputMode": "passwordbox",
"isConfidential": true,
"validation": {
"isRequired": true,
"dataType": "string"
},
"helpMarkDown": "<a href=\"https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html\" target=\"_blank\"><b>Creating a personal access token</b></a>"
}
],
"headers": [
{
"name": "Private-Token",
"value": "{{ endpoint.apitoken }}"
}
]
}
],
"helpMarkDown": "Learn more about <a href=\"https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html\" target=\"_blank\"><b>Creating GitLab tokens</b></a> and <a href=\"https://docs.microsoft.com/en-us/vsts/pipelines/library/service-endpoints?view=vsts\" target=\"_blank\"><b>Service connections</b></a> "
}
},
{
"id": "gitlab-release-artifact-type",
"description": "GitLab Artifact",
"type": "ms.vss-releaseartifact.release-artifact-type",
"targets": [
"ms.vss-releaseartifact.artifact-types"
],
"properties": {
"name": "Gitlab",
"displayName": "GitLab",
"endpointTypeId": "gitlab:Token",
"uniqueSourceIdentifier": "{{connection}}:{{definition}}:{{branch}}",
"downloadTaskId": "e6590a51-c3b6-4b88-99e4-b3498ed7cd5b",
"artifactType": "SourceControl",
"inputDescriptors": [
{
"id": "connection",
"name": "Service Endpoint",
"description": "Service Endpoint Id",
"inputMode": "Combo",
"isConfidential": false,
"hasDynamicValueInformation": true,
"validation": {
"isRequired": true,
"dataType": "string",
"maxLength": 300
}
},
{
"id": "definition",
"name": "Source (repository)",
"description": "Repository to pull",
"inputMode": "Combo",
"isConfidential": false,
"hasDynamicValueInformation": true,
"dependencyInputIds": [
"connection"
],
"validation": {
"isRequired": true,
"dataType": "string",
"maxLength": 300
}
},
{
"id": "defaultVersionType",
"name": "i18n:Default version",
"description": "i18n:The default version will be deployed when new releases are created. The version can be changed for manually created releases at the time of release creation",
"inputMode": "combo",
"isConfidential": false,
"hasDynamicValueInformation": false,
"validation": {
"isRequired": true,
"dataType": "string"
},
"values": {
"inputId": "defaultVersionTypeValues",
"defaultValue": "latestType",
"isLimitedToPossibleValues": true,
"possibleValues": [
{
"value": "latestType",
"displayValue": "i18n:Latest from default branch"
},
{
"value": "latestFromBranchType",
"displayValue": "i18n:Latest from specific branch"
},
{
"value": "selectDuringReleaseCreationType",
"displayValue": "i18n:Specify at the time of release creation"
}
]
}
},
{
"id": "branch",
"name": "i18n: Branch",
"description": "i18n: Artifacts from selected branch will be included in release.",
"inputMode": "Combo",
"isConfidential": false,
"hasDynamicValueInformation": true,
"validation": {
"isRequired": true,
"dataType": "string"
},
"dependencyInputIds": [
"connection",
"definition",
"defaultVersionType"
],
"properties": {
"visibleRule": "defaultVersionType == latestFromBranchType"
}
}
],
"dataSourceBindings": [
{
"target": "definition",
"dataSourceName": "Repositories",
"resultTemplate": "{ Value : \"{{id}}\", DisplayValue : \"{{{path_with_namespace}}}\" }"
},
{
"target": "branch",
"dataSourceName": "Branches",
"resultTemplate": "{ Value : \"{{{name}}}\", DisplayValue : \"{{{name}}}\" }"
},
{
"target": "versions",
"dataSourceName": "CommitsFromSelectedBranch",
"resultTemplate": "{ Value : \"{{id}}\", DisplayValue : \"{{{short_id}}}\" }"
},
{
"target": "latestversion",
"dataSourceName": "LatestCommit",
"resultTemplate": "{ Value : \"{{id}}\", DisplayValue : \"{{{short_id}}}\" }"
},
{
"target": "artifacts",
"dataSourceName": "Artifacts",
"resultTemplate": "{ Value : \"{{{path}}}\", DisplayValue : \"{{{path}}}\", data: { {{ #stringReplace ['tree','blob'] ['artifactType:\"folder\"','itemType:\"file\"'] type }} } }"
},
{
"target": "artifactItems",
"dataSourceName": "Artifacts",
"resultTemplate": "{ Value : \"{{{path}}}\", DisplayValue : \"{{{path}}}\", data: { itemType: \"{{ #stringReplace ['tree','blob'] ['folder','file'] type }}\" } }"
}
],
"browsableArtifactTypeMapping": {
"folder": "artifactItems"
}
}
}
]
}