-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.yaml
119 lines (110 loc) · 3.08 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
113
114
115
116
117
118
119
apiVersion: scaffolder.backstage.io/v1beta3
kind: Template
metadata:
name: devfile-starter
title: Bootstrap application with Devfile
description: Bootstrap application with Devfile
tags:
- devfile
spec:
owner: redhat-developer/odo
type: service
parameters:
- title: Provide details about the Devfile
required:
- devfile_data
properties:
devfile_data:
type: object
required:
- devfile
- version
properties:
devfile:
type: string
version:
type: string
starter_project:
type: string
ui:field: DevfileSelectorExtension
ui:autofocus: true
ui:options:
rows: 5
- title: Enter application info
required:
- name
- owner
properties:
name:
title: Name
type: string
description: Unique name of the application, e.g. my-java-quarkus-app
pattern: '^([a-zA-Z][a-zA-Z0-9]*)(-[a-zA-Z0-9]+)*$'
ui:autofocus: true
ui:options:
rows: 5
owner:
title: Owner
type: string
description: Owner of the application
ui:field: OwnerPicker
ui:options:
allowedKinds:
- Group
- title: Choose a location
required:
- repoUrl
- dryRun
properties:
repoUrl:
title: Repository Location
type: string
ui:field: RepoUrlPicker
ui:options:
allowedHosts:
- github.com
dryRun:
title: Only perform a dry run, don't publish anything
type: boolean
default: false
steps:
- id: odo-init
name: Generate
action: devfile:odo:component:init
input:
name: ${{ parameters.name }}
devfile: ${{ parameters.devfile_data.devfile }}
version: ${{ parameters.devfile_data.version }}
starter_project: ${{ parameters.devfile_data.starter_project }}
- id: fetch
name: Template Skeleton
action: fetch:template
input:
url: ./skeleton
values:
name: ${{ parameters.name }}
description: ${{ parameters.description }}
owner: ${{ parameters.owner }}
destination: ${{ parameters.repoUrl | parseRepoUrl }}
- id: publish
if: ${{ parameters.dryRun !== true }}
name: Publish
action: publish:github
input:
allowedHosts: ['github.com']
description: This is ${{ parameters.name }}
repoUrl: ${{ parameters.repoUrl }}
- id: register
if: ${{ parameters.dryRun !== true }}
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 }}