-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathtemplate-quickstart.yaml
53 lines (50 loc) · 1.61 KB
/
template-quickstart.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
apiVersion: scaffolder.backstage.io/v1beta3
kind: Template
# some metadata about the template itself
metadata:
name: Templatequickstart
title: Demo Template Quickstart
description: scaffolder v1beta3 template demo
spec:
owner: service.owner
type: service
# these are the steps which are rendered in the frontend with the form input
parameters:
- title: Fill in some steps
required:
- github_repo
- github_org
properties:
github_repo:
title: Repo Name
type: string
description: Name of the repository
github_org:
title: Org Name
type: string
description: Name of the GitHub Org or User account where the repo is to be created
# here's the steps that are executed in series in the scaffolder backend
steps:
- id: fetch-base
name: Fetch Base
action: fetch:template
input:
url: https://github.com/backstage/software-templates/blob/main/
values:
name: ${{ parameters.github_repo }}
owner: ${{ parameters.owner }}
- id: publish
name: Publish
action: publish:github
input:
allowedHosts: ['github.com']
description: This is ${{ parameters.name }}
repoUrl: github.com?repo=${{ parameters.github_repo }}&owner=${{ parameters.github_org }}
# some outputs which are saved along with the job for use in the frontend
output:
links:
- title: Repository
url: ${{ steps['publish'].output.remoteUrl }}
- title: Open in catalog
icon: catalog
entityRef: ${{ steps['register'].output.entityRef }}