-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtemplate.yaml
165 lines (164 loc) · 5.53 KB
/
template.yaml
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
apiVersion: scaffolder.backstage.io/v1beta3
kind: Template
metadata:
name: dataproduct-template
title: Data Product
description: Template definition of a Data Product
mesh:
icon: https://cdn-icons-png.flaticon.com/512/589/589598.png
tags:
- data-product
annotations:
backstage.io/techdocs-ref: dir:.
spec:
generates: systemtype:default/dataproduct
owner: agilelab
type: dataproduct
parameters:
- title: Data Product metadata
required:
- identifier
- description
- domain
- dataProductOwner
- devGroup
- email
- name
properties:
name:
title: Name
type: string
description: The name of the Data Product.
domainTypeRef:
title: domainTypeRef
type: string
default: domaintype:default/business-domain
ui:widget: hidden
domain:
title: Domain
type: string
description: The Domain of the Data Product.
ui:field: EntityPicker
ui:filter:
- fieldName: domainTypeRef
entityPath: relations.wb-instanceOf
ui:options:
allowArbitraryValues: false
allowedKinds:
- Domain
domainName:
type: string
ui:field: EntitySelectionPicker
ui:fieldName: domain
ui:property: spec.mesh.name
ui:options:
allowArbitraryValues: false
ui:widget: hidden
identifier:
title: Identifier
type: string
ui:field: IdentifierPicker
ui:options:
allowArbitraryValues: false
description: Autogenerated from the information above. A unique identifier for
the entity inside the domain. It will not be editable after creation
and is a string composed of [a-zA-Z] separated by any of [-_].
description:
title: Description
type: string
description: Detailed description about what functional area this DP is
representing, what purpose has, and business related information
devGroup:
title: Development Group
type: string
description: Data Product development group. This will be the group of
developers with access to the Data Product repositories
ui:field: EntityPicker
ui:options:
allowArbitraryValues: false
allowedKinds:
- Group
dataProductOwner:
title: Data Product Owner
type: string
description: User who owns the Data Product.
ui:field: EntityPicker
ui:options:
allowArbitraryValues: false
allowedKinds:
- User
tags:
title: Tags
type: array
description: Tags for the Data Product.
default: []
items:
type: string
email:
title: Contact email
type: string
format: email
description: Point of contact, it could be the owner or a distribution list, but
must be reliable and responsive.
informationSLA:
title: Information SLA
type: string
description: Describe what SLA the DP team is providing to answer additional
information requests about the Data Product.
maturity:
title: Maturity
type: string
description: Let the consumer understand if it is a tactical solution or not.
Could be really useful during migration from DWH or Data Lake.
enum:
- Tactical
- Strategic
steps:
- id: template
name: Fetch Skeleton + Template
action: fetch:template
input:
url: ./skeleton
targetPath: .
copyWithoutRender:
- .gitlab-ci.yml
values:
domain: ${{ parameters.domain }}
domainName: ${{ parameters.domainName }}
identifier: ${{ parameters.identifier }}
description: ${{ parameters.description }}
dataProductOwner: ${{ parameters.dataProductOwner }}
devGroup: ${{ parameters.devGroup }}
tags: ${{ parameters.tags }}
email: ${{ parameters.email }}
name: ${{ parameters.name }}
informationSLA: ${{ parameters.informationSLA }}
maturity: ${{ parameters.maturity }}
repoUrl: &repoUrl gitlab.com?owner=AgileDmbSandbox%2F{{orgname}}%2Fmesh.repository%2F${{parameters.domain | replace(r/domain:| |-/, "") }}%2F${{parameters.name.split(" ") | join("") | lower }}&repo=${{parameters.name.split(" ") | join("") | lower }}
rootDirectory: .
useCaseTemplateId: urn:dmb:utm:dataproduct-template:0.0.0
infrastructureTemplateId: urn:dmb:itm:dataproduct-provisioner:1
useCaseTemplateVersion: 0.0.0
- id: publish
name: Publish
action: witboostMeshComponent:publish:gitlab
input:
allowedHosts:
- gitlab.com
description: This is ${{ parameters.name }}
repoUrl: *repoUrl
rootDirectory: .
dataproduct: ${{ parameters.name }}
- id: register
name: Register
action: catalog:register
input:
repoContentsUrl: ${{ steps.publish.output.repoContentsUrl }}
catalogInfoPath: /catalog-info.yaml
output:
links:
- title: Repository
url: ${{ steps.publish.output.remoteUrl }}
- title: Open in catalog
icon: catalog
entityRef: ${{ steps.register.output.entityRef }}