-
Notifications
You must be signed in to change notification settings - Fork 116
/
Copy pathcatalog-info.yaml
231 lines (231 loc) · 8.67 KB
/
catalog-info.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
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
apiVersion: scaffolder.backstage.io/v1beta3
kind: Template
metadata:
name: app-creator
title: Create a New Application
description: Create a new application from a template
tags:
- simplenodeservice
links:
- url: https://www.dynatrace.com/trial
title: Dynatrace Trial
icon: docs
- url: https://github.com/grabnerandi/simplenodeservice
title: simplenodeservice on GitHub
icon: search
spec:
owner: infrastructure
type: service
parameters:
- title: Choose a Project
properties:
projectName:
title: Choose a Project
type: string
description: Which project would you like to deploy?
enum:
- 'simplenodeservice'
default: 'simplenodeservice'
- title: Your Team's Details
required:
- teamIdentifier
- teamFullName
- teamEmail
properties:
teamIdentifier:
title: Team identifier
description: Your unique internal team identifier (eg. team01)
type: string
pattern: '^team\d+$' # must match `team` + 1 or more digit. eg. `team1`, `team123`, `team9843` all valid. `team` invalid.
ui:placeholder: 'teamIdentifier'
default: 'team01'
teamFullName:
title: Full name of the team
description: Your real team name (eg. Team Best App Ever)
type: string
ui:placeholder: 'teamFullName'
default: "Team 01"
teamEmail:
title: Team Email
description: Dummy email to reach your team (eg. [email protected])
type: string
ui:placeholder: 'teamEmail'
default: "[email protected]"
- title: Application Details
required:
- appVersion
- releaseStage
- doraEnabled
- includeSecurityScans
- includeDTConfig
properties:
appVersion:
title: Application Version
description: SemVer eg. 1.0.2
type: string
default: "1.0.2"
pattern: '^\d+.\d+.\d+$'
releaseStage:
title: "Software Lifecycle Stage"
description: "Which stage is this software in? (eg. qa, staging, preprod)"
type: string
default: "qa"
doraEnabled:
title: "DORA metric tracking enabled?"
description: "Enable automatic DORA metric and OpenTelemetry trace generation for this application?"
type: string
enum:
- 'enabled'
- 'not enabled'
default: "not enabled"
includeSecurityScans:
title: "Include Security scans?"
description: "Scan this app automatically and push results to Dynatrace?"
type: boolean
default: false
includeDTConfig:
title: "Include Dynatrace Configuration?"
description: "Include level 1 (basic) Dynatrace Configuration as Code for this application?"
type: boolean
default: false
steps:
- id: fetch-base
name: Fetch Base
action: fetch:template
input:
url: "apptemplates/${{ parameters.projectName }}-content"
targetPath: "customer-apps/${{ parameters.projectName }}-${{ parameters.teamIdentifier}}-${{ parameters.releaseStage }}"
values:
projectName: ${{ parameters.projectName }}
teamIdentifier: ${{ parameters.teamIdentifier }}
teamFullName: ${{ parameters.teamFullName }}
teamEmail: ${{ parameters.teamEmail }}
appVersion: ${{ parameters.appVersion }}
releaseStage: ${{ parameters.releaseStage }}
doraEnabled: ${{ parameters.doraEnabled }}
includeSecurityScans: ${{ parameters.includeSecurityScans }}
includeDTConfig: ${{ parameters.includeDTConfig }}
- id: delete-security-scan-files
name: Delete security scan files
if: ${{ parameters.includeSecurityScans === false }}
action: fs:delete
input:
files:
- "./${{ parameters.projectName }}-content/argoapp/securityScanJob.yml"
- id: delete-monaco-files
name: Delete DT Configuration Files
if: ${{ parameters.includeDTConfig === false }}
action: fs:delete
input:
files:
- "./customer-apps/${{ parameters.projectName }}-${{ parameters.teamIdentifier }}-${{ parameters.releaseStage }}/monaco"
- "./customer-apps/${{ parameters.projectName }}-${{ parameters.teamIdentifier }}-${{ parameters.releaseStage }}/workflow-post-sync-apply-monaco.yml"
- id: publish
action: publish:github:pull-request
name: Create Pull Request
input:
repoUrl: "github.com?repo=GITHUB_REPO_NAME_PLACEHOLDER&owner=GITHUB_ORG_NAME_PLACEHOLDER"
branchName: ${{ parameters.projectName }}-${{ parameters.teamIdentifier}}-${{ parameters.releaseStage }}
targetBranchName: "main"
title: "New App Onboarding: ${{ parameters.projectName }}-${{ parameters.teamIdentifier}}-${{ parameters.releaseStage }}"
description: "A new application is coming! ${{ parameters.projectName }} from ${{ parameters.teamIdentifier}} in ${{ parameters.releaseStage }} is ready for review."
update: true
- id: catalog
name: Register to Catalog
action: catalog:register
input:
catalogInfoUrl: GITHUB_DOT_COM_REPO_PLACEHOLDER/blob/main/customer-apps/${{ parameters.projectName }}-${{ parameters.teamIdentifier }}-${{ parameters.releaseStage }}/backstage-templates/catalog-info.yaml
optional: true
output:
links:
- title: View on Github
url: ${{ steps.publish.output.remoteUrl }}
- title: View in Catalog
icon: catalog
entityRef: ${{ steps.catalog.output.entityRef }}
- title: View in ArgoCD
icon: catalog
url: https://CODESPACE_NAME_PLACEHOLDER-ARGOCD_PORT_NUMBER_PLACEHOLDER.GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN_PLACEHOLDER/applications/argocd/${{ parameters.projectName }}-${{ parameters.teamIdentifier }}-${{ parameters.releaseStage }}
- title: View in Dynatrace
icon: catalog
url: DT_TENANT_APPS_PLACEHOLDER
---
apiVersion: scaffolder.backstage.io/v1beta3
kind: Template
metadata:
name: gather-feedback
title: Platform Feedback Form
description: Imagine you need to collect feedback from your users. Don't make them email you, a web form is much nicer!
tags:
- platform
- feedback
links:
- url: https://www.example.com/platformteam
title: Platform Improvement Process
icon: docs
spec:
owner: infrastructure
type: platform
parameters:
- title: Feedback Form
properties:
feedbackType:
title: Feedback Type
type: string
description: Which project would you like to deploy?
enum:
- 'improvement'
- 'feature'
- 'bug'
- 'praise'
enumNames:
- 'An existing platform feature could be improved...'
- 'The platform needs to do...'
- 'Help! Something is broken!'
- 'The platform is great. Just saying thanks!'
default: 'improvement'
userIdentifier:
title: Your Name (optional)
description: (optional) Your name
type: string
ui:placeholder: 'yourName'
default: 'testing'
feedback:
title: "Leave your feedback below"
type: string
ui:widget: textarea
ui:options:
rows: 10
default: "Talk to us..."
keepMeInformed:
title: "Stay informed of progress on this item?"
description: "Tick this box if you want email updates on this item to be sent from the platform team."
type: boolean
default: true
steps:
- id: send-event
name: Submit Feedback
action: http:backstage:request
input:
method: "POST"
# This proxy is set in app-config.production.yaml
# It should actually point to the bizevent ingest
# But I don't know how to use backstage + oAuth
# Q in #backstage: https://cloud-native.slack.com/archives/C01B5HYR2R3/p1701406188130209
path: "/proxy/dteventingest"
headers:
Content-Type: "application/json; charset=utf-8"
body: |
{
"eventType": "CUSTOM_INFO",
"properties": {
"type": "${{ parameters.feedbackType }}",
"user": "${{ parameters.userIdentifier }}",
"feedback": "${{ parameters.feedback }}",
"stay-informed": "${{ parameters.keepMeInformed }}",
"source": "backstage",
"template": "platform-feedback"
},
"timeout": 1,
"title": "ℹ️ Platform Feedback ℹ️"
}