forked from temp-demo-organisation/nationalparks-py
-
Notifications
You must be signed in to change notification settings - Fork 6
/
catalog-info6.yaml
125 lines (118 loc) · 4.31 KB
/
catalog-info6.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
apiVersion: scaffolder.backstage.io/v1beta3
# https://backstage.io/docs/features/software-catalog/descriptor-format#kind-template
kind: Template
metadata:
name: create-frontend-plugin
title: Clean Frontend Plugin Template
description: Template for creating a fontend plugin
tags:
- frontend-plugin
- backstage-plugin
spec:
owner: janus-authors
system: janus-idp
type: plugin
# These parameters are used to generate the input form in the frontend, and are
# used to gather input data for the execution of the template.
parameters:
- title: Provide some information
required:
- plugin_id
properties:
plugin_id:
title: Plugin ID
type: string
pattern: '^[a-z0-9-]*[a-z0-9]$'
description: Unique ID of the plugin.
ui:help: Plugin IDs must be lowercase and contain only letters, digits, and dashes.
ui:autofocus: true
# owner:
# title: Owner
# type: string
# description: Owner of the plugin. The owner must be a space separated list of team names (e.g. @org/team-name), usernames (e.g. @username), or the email addresses (e.g. [email protected]).
# 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
is_existing_repo:
title: This is an Existing Repository
type: boolean
description: Select if repository already exist
default: false
# ui:autofocus: true
# ui:options:
# rows:
dependencies:
is_existing_repo:
allOf:
- if:
properties:
is_existing_repo:
const: true
then:
properties:
branchName:
title: Branch Name
type: string
description: The name for the branch
default: ''
targetBranchName:
title: Target Branch Name
type: string
description: The target branch name of the merge request
default: ''
# You can use additional fields of parameters within conditional parameters such as required.
required:
- branchName
- targetBranchName
# These steps are executed in the scaffolder backend, using data that we gathered
# via the parameters above.
steps:
# Each step executes an action, in this case one templates files into the working directory.
- id: template
name: Fetch Skeleton + Template
action: fetch:template
input:
url: ./skeleton
values:
plugin_id: ${{ parameters.plugin_id }}
# description: ${{ parameters.description }}
repoUrl: ${{ parameters.repoUrl | parseRepoUrl }}
owner: ${{ parameters.owner }}
#This step publishes the contents of the working directory to GitHub if .
- id: publish
name: Publish
if: ${{ parameters.is_existing_repo === false }}
action: publish:github
input:
allowedHosts: ["github.com"]
description: This is ${{ parameters.plugin_id }} frontend plugin.
repoUrl: ${{ parameters.repoUrl }}
- id: publishGithub
name: Create pull request with the frontend plugin sample
if: ${{ parameters.is_existing_repo === true }}
action: publish:github:pull-request
input:
repoUrl: ${{ parameters.repoUrl }}
branchName: ${{ parameters.branchName }}
targetBranchName: ${{ parameters.targetBranchName }}
title: Create front-end plugin ${{ parameters.plugin_id }}
description: This pull request creates the skeleton for your front-end plugin
# Outputs are displayed to the user after a successful execution of the template.
output:
links:
- title: View Plugin
url: ${{ steps.publish.output.remoteUrl }}
- title: View Pull Request
url: ${{ steps.publishGithub.output.remoteUrl }}