-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathcollections.yaml
136 lines (131 loc) · 4.68 KB
/
collections.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
126
127
128
129
130
131
132
133
134
135
136
apiVersion: scaffolder.backstage.io/v1beta3
kind: Template
metadata:
name: ansible-collection-template
title: Create Ansible Collection Project
description: Create a new starter collection Git project preconfigured with best practices.
tags:
- recommended
- ansible
- collection
spec:
owner: ansible-authors
system: ansible
type: service
parameters:
- title: Provide information about the new component
required:
- repoOwner
- repoName
- owner
- collectionGroup
- collectionName
properties:
sourceControl:
title: Select source control option
type: string
description: Select the source control option for your Ansible project.
default: github.com
enum:
- github.com
enumNames:
- 'GitHub'
repoOwner:
title: Source code repository organization name or username
type: string
description: The organization name or username of your source code repository. For example, “my-github-username”.
maxLength: 100
repoName:
title: Collection repository name
description: The name of the new collection project repository. For example, “my-new-collection-repo”.
type: string
maxLength: 100
pattern: '^([a-zA-Z][a-zA-Z0-9_]*)(-[a-zA-Z0-9_]+)*$'
description:
title: Collection description
type: string
description: Describe the collection and its purpose to help other users understand what to use it for.
maxLength: 350
collectionGroup:
title: Collection namespace
description: The new collection project's namespace. For example, “my_new_collection_namespace”.
type: string
maxLength: 63
minLength: 2
pattern: '^[a-z][a-z0-9_]+$'
collectionName:
title: Collection name
description: The new collection project's name. For example, “my_new_collection_name”.
type: string
maxLength: 63
minLength: 2
pattern: '^[a-z][a-z0-9_]+$'
owner:
title: Catalog Owner name
type: string
description: The Red Hat Developer Hub catalog item owner. This will appear on the “My items” tab. For example, “my-devhub-username”.
ui:field: EntityPicker
ui:options:
catalogFilter:
kind:
- Group
- User
system:
title: System
type: string
description: The Red Hat Developer Hub system catalog item name. This will appear on the “My items” tab. For example, “my-devhub-system”.
ui:field: EntityPicker
ui:options:
catalogFilter:
kind:
- System
steps:
- id: ansible
name: Generating the Ansible Source Code Component
action: ansible:content:create
input:
repoOwner: '${{ parameters.repoOwner }}'
repoName: '${{ parameters.repoName }}'
description: '${{ parameters.description }}'
collectionGroup: '${{ parameters.collectionGroup }}'
collectionName: '${{ parameters.collectionName }}'
applicationType: collection-project
sourceControl: '${{ parameters.sourceControl }}'
- id: catalogTemplate
name: Generating the Catalog Info Component
action: fetch:template
input:
url: ../catalog-info/
values:
repoUrl: ${{ steps.ansible.output.repoUrl }}
owner: ${{ parameters.owner }}
system: ${{ parameters.system }}
applicationType: collection-project
description: ${{ parameters.description }}
collectionGroup: ${{ parameters.collectionGroup }}
collectionName: ${{ parameters.collectionName }}
sourceControl: ${{ parameters.sourceControl }}
devSpacesBaseUrl: ${{ steps.ansible.output.devSpacesBaseUrl }}
- id: publish
name: Publish
action: publish:github
input:
allowedHosts:
- ${{ parameters.sourceControl }}
description: ${{ parameters.description }}
repoUrl: ${{ steps.ansible.output.repoUrl }}
repoVisibility: 'public'
defaultBranch: main
- 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 }}