-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtemplate.yaml
112 lines (111 loc) · 3.67 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
apiVersion: scaffolder.backstage.io/v1beta3
kind: Template
metadata:
name: template-expressjs
title: ExpressJS
description: Standard Express.js (Node.Js) microservice with recommended configuration for HMCTS
tags:
- nodejs
spec:
owner: dts_platform_operations
type: service
parameters:
- title: Provide some simple information
required:
- product
- component
- owner
- slack_contact_channel
- github_topic
properties:
product:
title: Product
type: string
description: Product this component belongs to, normally the team name, e.g. cmc
github_topic:
title: Github Topic
default: jenkins-cft-j-z
type: string
description: GitHub Topic added in order for Jenkins to find the repository when it scans GitHub, alphabetically grouped i.e. jenkins-cft-a-c, jenkins-cft-d-i, jenkins-cft-j-z
component:
title: Component
type: string
description: Name of the component, e.g. frontend
slack_contact_channel:
title: Slack contact channel
type: string
description: Which channel (or user) to contact if there's any issues with this service.
description:
title: Description
type: string
description: Description of the application, a sensible default will be used if not specified.
http_port:
title: HTTP port
type: integer
description: The port to run the app on.
github_admin_team:
title: GitHub admin team
type: string
description: Which GitHub team should have admin permissions, use the format hmcts/<team-id>?
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
steps:
- id: template
name: Fetch Skeleton + Template
action: fetch:template
input:
url: ./skeleton
copyWithoutTemplating:
- '.yarn/**'
- 'src/main/views/**'
values:
product: '${{ parameters.product }}'
component: '${{ parameters.component }}'
app_full_name: '${{ parameters.product }}-${{ parameters.component }}'
description: '${{ parameters.description }}'
http_port: '${{ parameters.http_port }}'
owner: '${{ parameters.owner }}'
destination: '${{ parameters.repoUrl | parseRepoUrl }}'
slack_contact_channel: ${{ parameters.slack_contact_channel }}
github_topics: ${{ parameters.github_topic }}
- id: publish
name: Publish
action: publish:github
input:
allowedHosts: ['github.com']
allowedOwners:
- hmcts
- hmcts-test
repoUrl: ${{ parameters.repoUrl }}
access: ${{ parameters.github_admin_team }}
requireCodeOwnerReviews: true
repoVisibility: public
topics:
- ${{ parameters.product }}
- ${{ parameters.github_topic }}
- id: register
name: Register
action: catalog:register
input:
repoContentsUrl: '${{ steps.publish.output.repoContentsUrl }}'
catalogInfoPath: '/catalog-info.yaml'
output:
remoteUrl: '${{ steps.publish.output.remoteUrl }}'
entityRef: '${{ steps.register.output.entityRef }}'