@backstage/plugin-catalog-backend-module-gitlab 0.8.4-next.0 → 0.8.5-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -0
- package/config.schema.json +272 -0
- package/package.json +11 -11
- package/config.d.ts +0 -130
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @backstage/plugin-catalog-backend-module-gitlab
|
|
2
2
|
|
|
3
|
+
## 0.8.5-next.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
- @backstage/backend-defaults@0.17.4-next.0
|
|
9
|
+
- @backstage/backend-plugin-api@1.9.3-next.0
|
|
10
|
+
- @backstage/plugin-catalog-node@2.2.3-next.0
|
|
11
|
+
- @backstage/plugin-events-node@0.4.24-next.0
|
|
12
|
+
|
|
13
|
+
## 0.8.4
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
- @backstage/backend-defaults@0.17.3
|
|
19
|
+
- @backstage/integration@2.0.3
|
|
20
|
+
- @backstage/backend-plugin-api@1.9.2
|
|
21
|
+
- @backstage/plugin-catalog-node@2.2.2
|
|
22
|
+
- @backstage/plugin-events-node@0.4.23
|
|
23
|
+
|
|
3
24
|
## 0.8.4-next.0
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"catalog": {
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"providers": {
|
|
9
|
+
"type": "object",
|
|
10
|
+
"properties": {
|
|
11
|
+
"gitlab": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"additionalProperties": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"properties": {
|
|
16
|
+
"host": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"description": "(Required) Gitlab's host name."
|
|
19
|
+
},
|
|
20
|
+
"group": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"description": "(Optional) Gitlab's group[/subgroup] where the discovery is done. If not defined the whole instance will be scanned."
|
|
23
|
+
},
|
|
24
|
+
"restrictUsersToGroup": {
|
|
25
|
+
"type": "boolean",
|
|
26
|
+
"description": "If true, the provider will only ingest users that are part of the configured group."
|
|
27
|
+
},
|
|
28
|
+
"branch": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"description": "(Optional) Default branch to read the catalog-info.yaml file. If not set, 'master' will be used."
|
|
31
|
+
},
|
|
32
|
+
"fallbackBranch": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"description": "If no `branch` is configured and there is no default branch defined at the project as well, this fallback is used to discover catalog files. Defaults to: `master`"
|
|
35
|
+
},
|
|
36
|
+
"catalogFile": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"description": "Defaults to `catalog-info.yaml`"
|
|
39
|
+
},
|
|
40
|
+
"entityFilename": {
|
|
41
|
+
"type": "string",
|
|
42
|
+
"description": "(Optional) The name used for the catalog file. If not set, 'catalog-info.yaml' will be used."
|
|
43
|
+
},
|
|
44
|
+
"schedule": {
|
|
45
|
+
"type": "object",
|
|
46
|
+
"properties": {
|
|
47
|
+
"frequency": {
|
|
48
|
+
"anyOf": [
|
|
49
|
+
{
|
|
50
|
+
"type": "object",
|
|
51
|
+
"properties": {
|
|
52
|
+
"cron": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"description": "A crontab style string."
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"required": [
|
|
58
|
+
"cron"
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"type": "string"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"type": "object",
|
|
66
|
+
"properties": {
|
|
67
|
+
"years": {
|
|
68
|
+
"type": "number"
|
|
69
|
+
},
|
|
70
|
+
"months": {
|
|
71
|
+
"type": "number"
|
|
72
|
+
},
|
|
73
|
+
"weeks": {
|
|
74
|
+
"type": "number"
|
|
75
|
+
},
|
|
76
|
+
"days": {
|
|
77
|
+
"type": "number"
|
|
78
|
+
},
|
|
79
|
+
"hours": {
|
|
80
|
+
"type": "number"
|
|
81
|
+
},
|
|
82
|
+
"minutes": {
|
|
83
|
+
"type": "number"
|
|
84
|
+
},
|
|
85
|
+
"seconds": {
|
|
86
|
+
"type": "number"
|
|
87
|
+
},
|
|
88
|
+
"milliseconds": {
|
|
89
|
+
"type": "number"
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"description": "Human friendly durations object."
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"type": "object",
|
|
96
|
+
"properties": {
|
|
97
|
+
"trigger": {
|
|
98
|
+
"type": "string",
|
|
99
|
+
"const": "manual"
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"required": [
|
|
103
|
+
"trigger"
|
|
104
|
+
]
|
|
105
|
+
}
|
|
106
|
+
],
|
|
107
|
+
"description": "How often you want the task to run. The system does its best to avoid overlapping invocations."
|
|
108
|
+
},
|
|
109
|
+
"timeout": {
|
|
110
|
+
"anyOf": [
|
|
111
|
+
{
|
|
112
|
+
"type": "string"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"type": "object",
|
|
116
|
+
"properties": {
|
|
117
|
+
"years": {
|
|
118
|
+
"type": "number"
|
|
119
|
+
},
|
|
120
|
+
"months": {
|
|
121
|
+
"type": "number"
|
|
122
|
+
},
|
|
123
|
+
"weeks": {
|
|
124
|
+
"type": "number"
|
|
125
|
+
},
|
|
126
|
+
"days": {
|
|
127
|
+
"type": "number"
|
|
128
|
+
},
|
|
129
|
+
"hours": {
|
|
130
|
+
"type": "number"
|
|
131
|
+
},
|
|
132
|
+
"minutes": {
|
|
133
|
+
"type": "number"
|
|
134
|
+
},
|
|
135
|
+
"seconds": {
|
|
136
|
+
"type": "number"
|
|
137
|
+
},
|
|
138
|
+
"milliseconds": {
|
|
139
|
+
"type": "number"
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"description": "Human friendly durations object."
|
|
143
|
+
}
|
|
144
|
+
],
|
|
145
|
+
"description": "The maximum amount of time that a single task invocation can take, before it's considered timed out and gets \"released\" such that a new invocation is permitted to take place (possibly, then, on a different worker)."
|
|
146
|
+
},
|
|
147
|
+
"initialDelay": {
|
|
148
|
+
"anyOf": [
|
|
149
|
+
{
|
|
150
|
+
"type": "string"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"type": "object",
|
|
154
|
+
"properties": {
|
|
155
|
+
"years": {
|
|
156
|
+
"type": "number"
|
|
157
|
+
},
|
|
158
|
+
"months": {
|
|
159
|
+
"type": "number"
|
|
160
|
+
},
|
|
161
|
+
"weeks": {
|
|
162
|
+
"type": "number"
|
|
163
|
+
},
|
|
164
|
+
"days": {
|
|
165
|
+
"type": "number"
|
|
166
|
+
},
|
|
167
|
+
"hours": {
|
|
168
|
+
"type": "number"
|
|
169
|
+
},
|
|
170
|
+
"minutes": {
|
|
171
|
+
"type": "number"
|
|
172
|
+
},
|
|
173
|
+
"seconds": {
|
|
174
|
+
"type": "number"
|
|
175
|
+
},
|
|
176
|
+
"milliseconds": {
|
|
177
|
+
"type": "number"
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
"description": "Human friendly durations object."
|
|
181
|
+
}
|
|
182
|
+
],
|
|
183
|
+
"description": "The amount of time that should pass before the first invocation happens."
|
|
184
|
+
},
|
|
185
|
+
"scope": {
|
|
186
|
+
"type": "string",
|
|
187
|
+
"enum": [
|
|
188
|
+
"global",
|
|
189
|
+
"local"
|
|
190
|
+
],
|
|
191
|
+
"description": "Sets the scope of concurrency control / locking to apply for invocations of this task."
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
"required": [
|
|
195
|
+
"frequency",
|
|
196
|
+
"timeout"
|
|
197
|
+
],
|
|
198
|
+
"description": "(Optional) TaskScheduleDefinition for the refresh."
|
|
199
|
+
},
|
|
200
|
+
"projectPattern": {
|
|
201
|
+
"type": "string",
|
|
202
|
+
"description": "(Optional) RegExp for the Project Name Pattern"
|
|
203
|
+
},
|
|
204
|
+
"userPattern": {
|
|
205
|
+
"type": "string",
|
|
206
|
+
"description": "(Optional) RegExp for the User Name Pattern"
|
|
207
|
+
},
|
|
208
|
+
"groupPattern": {
|
|
209
|
+
"anyOf": [
|
|
210
|
+
{
|
|
211
|
+
"type": "string"
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"type": "array",
|
|
215
|
+
"items": {
|
|
216
|
+
"type": "string"
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
],
|
|
220
|
+
"description": "(Optional) RegExp for the Group Name Pattern"
|
|
221
|
+
},
|
|
222
|
+
"relations": {
|
|
223
|
+
"type": "array",
|
|
224
|
+
"items": {
|
|
225
|
+
"type": "string"
|
|
226
|
+
},
|
|
227
|
+
"description": "Specifies the types of group membership relations that should be included when ingesting data.\n\nThe following values are valid:\n- 'DIRECT': Direct members of the group. This is the default relation and is always included.\n- 'INHERITED': Members inherited from parent (ascendant) groups.\n- 'DESCENDANTS': Members from child (descendant) groups.\n- 'SHARED_FROM_GROUPS': Members shared from other groups.\n\nSee: https://docs.gitlab.com/ee/api/graphql/reference/#groupmemberrelation\n\nIf the `relations` array is provided in the app-config.yaml, it should contain any combination of the above values. The 'DIRECT' relation is automatically included and cannot be excluded, even if not specified."
|
|
228
|
+
},
|
|
229
|
+
"orgEnabled": {
|
|
230
|
+
"type": "boolean",
|
|
231
|
+
"description": "Enable org ingestion Defaults to `false`"
|
|
232
|
+
},
|
|
233
|
+
"skipForkedRepos": {
|
|
234
|
+
"type": "boolean",
|
|
235
|
+
"description": "(Optional) Skip forked repository"
|
|
236
|
+
},
|
|
237
|
+
"includeArchivedRepos": {
|
|
238
|
+
"type": "boolean",
|
|
239
|
+
"description": "(Optional) Include archived repository"
|
|
240
|
+
},
|
|
241
|
+
"excludeRepos": {
|
|
242
|
+
"type": "array",
|
|
243
|
+
"items": {
|
|
244
|
+
"type": "string"
|
|
245
|
+
},
|
|
246
|
+
"description": "(Optional) A list of strings containing the paths of the repositories to skip Should be in the format group/subgroup/repo, with no leading or trailing slashes."
|
|
247
|
+
},
|
|
248
|
+
"includeUsersWithoutSeat": {
|
|
249
|
+
"type": "boolean",
|
|
250
|
+
"description": "If true, users without a seat will be included in the catalog. Group/Application Access Tokens are still filtered out but you might find service accounts or other users without a seat. Defaults to `false`"
|
|
251
|
+
},
|
|
252
|
+
"membership": {
|
|
253
|
+
"type": "boolean",
|
|
254
|
+
"description": "(Optional) If true, limit by repositories that the current user is a member of. See: https://docs.gitlab.com/api/projects/#list-projects"
|
|
255
|
+
},
|
|
256
|
+
"topics": {
|
|
257
|
+
"type": "string",
|
|
258
|
+
"description": "(Optional) List of topic names. Limit results to repositories that match all of given topics. See: https://docs.gitlab.com/api/projects/#list-projects"
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
"required": [
|
|
262
|
+
"host"
|
|
263
|
+
]
|
|
264
|
+
},
|
|
265
|
+
"description": "GitlabDiscoveryEntityProvider configuration"
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-catalog-backend-module-gitlab",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.5-next.0",
|
|
4
4
|
"description": "A Backstage catalog backend module that helps integrate towards GitLab",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "backend-plugin-module",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
}
|
|
53
53
|
},
|
|
54
54
|
"files": [
|
|
55
|
-
"config.
|
|
55
|
+
"config.schema.json",
|
|
56
56
|
"dist"
|
|
57
57
|
],
|
|
58
58
|
"scripts": {
|
|
@@ -65,24 +65,24 @@
|
|
|
65
65
|
"test": "backstage-cli package test"
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
|
-
"@backstage/backend-defaults": "0.17.
|
|
69
|
-
"@backstage/backend-plugin-api": "1.9.
|
|
68
|
+
"@backstage/backend-defaults": "0.17.4-next.0",
|
|
69
|
+
"@backstage/backend-plugin-api": "1.9.3-next.0",
|
|
70
70
|
"@backstage/catalog-model": "1.9.0",
|
|
71
71
|
"@backstage/config": "1.3.8",
|
|
72
72
|
"@backstage/errors": "1.3.1",
|
|
73
|
-
"@backstage/integration": "2.0.3
|
|
73
|
+
"@backstage/integration": "2.0.3",
|
|
74
74
|
"@backstage/plugin-catalog-common": "1.1.10",
|
|
75
|
-
"@backstage/plugin-catalog-node": "2.2.
|
|
76
|
-
"@backstage/plugin-events-node": "0.4.
|
|
75
|
+
"@backstage/plugin-catalog-node": "2.2.3-next.0",
|
|
76
|
+
"@backstage/plugin-events-node": "0.4.24-next.0",
|
|
77
77
|
"@gitbeaker/rest": "^40.0.3",
|
|
78
78
|
"lodash": "^4.17.21"
|
|
79
79
|
},
|
|
80
80
|
"devDependencies": {
|
|
81
|
-
"@backstage/backend-test-utils": "1.11.
|
|
82
|
-
"@backstage/cli": "0.36.
|
|
83
|
-
"@backstage/plugin-events-backend-test-utils": "0.1.
|
|
81
|
+
"@backstage/backend-test-utils": "1.11.5-next.0",
|
|
82
|
+
"@backstage/cli": "0.36.4-next.0",
|
|
83
|
+
"@backstage/plugin-events-backend-test-utils": "0.1.57-next.0",
|
|
84
84
|
"@types/lodash": "^4.14.151",
|
|
85
85
|
"msw": "^1.0.0"
|
|
86
86
|
},
|
|
87
|
-
"configSchema": "config.
|
|
87
|
+
"configSchema": "config.schema.json"
|
|
88
88
|
}
|
package/config.d.ts
DELETED
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2020 The Backstage Authors
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
import { SchedulerServiceTaskScheduleDefinitionConfig } from '@backstage/backend-plugin-api';
|
|
18
|
-
|
|
19
|
-
export interface Config {
|
|
20
|
-
catalog?: {
|
|
21
|
-
providers?: {
|
|
22
|
-
/**
|
|
23
|
-
* GitlabDiscoveryEntityProvider configuration
|
|
24
|
-
*/
|
|
25
|
-
gitlab?: {
|
|
26
|
-
[name: string]: {
|
|
27
|
-
/**
|
|
28
|
-
* (Required) Gitlab's host name.
|
|
29
|
-
*/
|
|
30
|
-
host: string;
|
|
31
|
-
/**
|
|
32
|
-
* (Optional) Gitlab's group[/subgroup] where the discovery is done.
|
|
33
|
-
* If not defined the whole instance will be scanned.
|
|
34
|
-
*/
|
|
35
|
-
group?: string;
|
|
36
|
-
/**
|
|
37
|
-
* If true, the provider will only ingest users that are part of the configured group.
|
|
38
|
-
*/
|
|
39
|
-
restrictUsersToGroup?: boolean;
|
|
40
|
-
/**
|
|
41
|
-
* (Optional) Default branch to read the catalog-info.yaml file.
|
|
42
|
-
* If not set, 'master' will be used.
|
|
43
|
-
*/
|
|
44
|
-
branch?: string;
|
|
45
|
-
/**
|
|
46
|
-
* If no `branch` is configured and there is no default branch defined at the project as well, this fallback is used
|
|
47
|
-
* to discover catalog files.
|
|
48
|
-
* Defaults to: `master`
|
|
49
|
-
*/
|
|
50
|
-
fallbackBranch?: string;
|
|
51
|
-
/**
|
|
52
|
-
* Defaults to `catalog-info.yaml`
|
|
53
|
-
*/
|
|
54
|
-
catalogFile?: string;
|
|
55
|
-
/**
|
|
56
|
-
* (Optional) The name used for the catalog file.
|
|
57
|
-
* If not set, 'catalog-info.yaml' will be used.
|
|
58
|
-
*/
|
|
59
|
-
entityFilename?: string;
|
|
60
|
-
/**
|
|
61
|
-
* (Optional) TaskScheduleDefinition for the refresh.
|
|
62
|
-
*/
|
|
63
|
-
schedule?: SchedulerServiceTaskScheduleDefinitionConfig;
|
|
64
|
-
/**
|
|
65
|
-
* (Optional) RegExp for the Project Name Pattern
|
|
66
|
-
*/
|
|
67
|
-
projectPattern?: string;
|
|
68
|
-
/**
|
|
69
|
-
* (Optional) RegExp for the User Name Pattern
|
|
70
|
-
*/
|
|
71
|
-
userPattern?: string;
|
|
72
|
-
/**
|
|
73
|
-
* (Optional) RegExp for the Group Name Pattern
|
|
74
|
-
*/
|
|
75
|
-
groupPattern?: string | string[];
|
|
76
|
-
/**
|
|
77
|
-
* Specifies the types of group membership relations that should be included when ingesting data.
|
|
78
|
-
*
|
|
79
|
-
* The following values are valid:
|
|
80
|
-
* - 'DIRECT': Direct members of the group. This is the default relation and is always included.
|
|
81
|
-
* - 'INHERITED': Members inherited from parent (ascendant) groups.
|
|
82
|
-
* - 'DESCENDANTS': Members from child (descendant) groups.
|
|
83
|
-
* - 'SHARED_FROM_GROUPS': Members shared from other groups.
|
|
84
|
-
*
|
|
85
|
-
* See: https://docs.gitlab.com/ee/api/graphql/reference/#groupmemberrelation
|
|
86
|
-
*
|
|
87
|
-
* If the `relations` array is provided in the app-config.yaml, it should contain any combination of the above values.
|
|
88
|
-
* The 'DIRECT' relation is automatically included and cannot be excluded, even if not specified.
|
|
89
|
-
*/
|
|
90
|
-
relations?: string[];
|
|
91
|
-
/**
|
|
92
|
-
* Enable org ingestion
|
|
93
|
-
* Defaults to `false`
|
|
94
|
-
*/
|
|
95
|
-
orgEnabled?: boolean;
|
|
96
|
-
/**
|
|
97
|
-
* (Optional) Skip forked repository
|
|
98
|
-
*/
|
|
99
|
-
skipForkedRepos?: boolean;
|
|
100
|
-
/**
|
|
101
|
-
* (Optional) Include archived repository
|
|
102
|
-
*/
|
|
103
|
-
includeArchivedRepos?: boolean;
|
|
104
|
-
/**
|
|
105
|
-
* (Optional) A list of strings containing the paths of the repositories to skip
|
|
106
|
-
* Should be in the format group/subgroup/repo, with no leading or trailing slashes.
|
|
107
|
-
*/
|
|
108
|
-
excludeRepos?: string[];
|
|
109
|
-
/**
|
|
110
|
-
* If true, users without a seat will be included in the catalog.
|
|
111
|
-
* Group/Application Access Tokens are still filtered out but you might find service accounts or other users without a seat.
|
|
112
|
-
* Defaults to `false`
|
|
113
|
-
*/
|
|
114
|
-
includeUsersWithoutSeat?: boolean;
|
|
115
|
-
/**
|
|
116
|
-
* (Optional) If true, limit by repositories that the current user is a member of.
|
|
117
|
-
* See: https://docs.gitlab.com/api/projects/#list-projects
|
|
118
|
-
*/
|
|
119
|
-
membership?: boolean;
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* (Optional) List of topic names. Limit results to repositories that match all of given topics.
|
|
123
|
-
* See: https://docs.gitlab.com/api/projects/#list-projects
|
|
124
|
-
*/
|
|
125
|
-
topics?: string;
|
|
126
|
-
};
|
|
127
|
-
};
|
|
128
|
-
};
|
|
129
|
-
};
|
|
130
|
-
}
|