-
Notifications
You must be signed in to change notification settings - Fork 0
/
template-db.yaml
113 lines (107 loc) · 3.36 KB
/
template-db.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
apiVersion: scaffolder.backstage.io/v1beta3
kind: Template
metadata:
name: bwce-template-db-demo
title: BWCE Template (Database) 1
description: Create a new BWCE project with Documentation, that exposes a configured database table.
tags:
- tibco
- bwce
- postgres
- database
- table
- recommended
spec:
owner: ACME
type: service
parameters:
- title: Provide Database Details
required:
- name
- description
properties:
name:
title: Name
type: string
description: Unique name of the BWCE-Database Project
ui:field: EntityNamePicker
ui:autofocus: true
description:
title: Description
type: string
description: A description for the BWCE-Database Project
table_name:
title: Table Name
type: string
description: The Database table that this BWCE-Project should expose as a service (customers / products)
default: 'customers'
db_url:
title: Database URL
type: string
description: The Database URL that this BWCE-Project should use to connect to the database
default: 'jdbc:tibcosoftwareinc:postgresql://postgres-internal-service.bwce-pg.svc.cluster.local:5432;DatabaseName=mydb'
db_user:
title: Database User
type: string
description: The Database user for this BWCE-Project to connect to the database
default: 'root'
db_pass:
title: Database Password
type: string
ui:field: Secret # will print '******' as value for property 'password' on Review Step
owner:
title: Owner
type: string
description: Owner of the component
ui:field: OwnerPicker
ui:options:
allowedKinds:
- Group
- title: Choose a location
required:
- repoUrl
properties:
repoUrl:
title: Repository Location
type: string
ui:field: RepoUrlPicker
ui:options:
allowedHosts:
- github.com
# This template is meant to be used on top of an existing template.
# By adding the following and fetching from an absolute URL you can
# add in the docs template
steps:
- id: fetch
name: BWCE Skeleton
action: fetch:template
input:
url: ./skeleton-db
values:
name: ${{ parameters.name }}
description: ${{ parameters.description }}
destination: ${{ parameters.repoUrl | parseRepoUrl }}
owner: ${{ parameters.owner }}
table_name: ${{ parameters.table_name }}
db_url: ${{ parameters.db_url }}
db_user: ${{ parameters.db_user }}
- id: publish
name: Publish
action: publish:github
input:
allowedHosts: ["github.com"]
description: This is ${{ parameters.name }}
repoUrl: ${{ parameters.repoUrl }}
- 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 }}