generated from NishkarshRaj/Maven-Springboot-Starter-Template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtemplate-descriptor.yaml
143 lines (135 loc) · 4.07 KB
/
template-descriptor.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
137
138
139
140
141
142
143
apiVersion: scaffolder.backstage.io/v1beta3
kind: Template
metadata:
name: statusneo-springboot-template
title: Golden Path - SpringBoot
description: Create a simple microservice using Java, Maven, Springboot and GitHub Actions
tags:
- github-actions
- java
- recommended
links:
- title: Backstage
url: https://backstage.io
icon: backstage
- title: Author
url: https://github.com/NishkarshRaj
icon: github
spec:
owner: [email protected]
type: service
parameters:
- title: SpringBoot App
required:
- component_id
- owner
- java_package_name
properties:
component_id:
title: Name
type: string
description: Unique name of the component
ui:field: EntityNamePicker
java_package_name:
title: Java Package Name
type: string
description: Name for the java package. eg (io.backstage.blah)
description:
title: Description
type: string
description: Help others understand what this website is for.
owner:
title: Owner
type: string
description: Owner of the component
ui:field: OwnerPicker
ui:options:
allowedKinds:
- Group
- title: Docker Image
required:
- containerRegistry
- imageName
- imageProject
properties:
containerRegistry:
title: Name
type: string
description: Unique name of the component
enum:
- DockerHub
- ghcr.io
- JFrog
- AWS ECR
- Google Container Registry
- Azure Container Registry
imageName:
title: Docker Image Name
type: string
description: Name your Docker image - must be in lowercase
imageProject:
title: Docker Project
type: string
description: Project for collection of images - must be in lowercase
- title: Let's create your Repository
required:
- repoUrl
properties:
repoUrl:
title: Repository Location
type: string
ui:field: RepoUrlPicker
ui:options:
allowedHosts:
- github.com
- gitlab.com
- dev.azure.com
- bitbucket.org
- sample.gitonserver.net
# requestUserCredentials:
# secretsKey: USER_OAUTH_TOKEN
steps:
- id: template
name: Fetch Skeleton + Template
action: fetch:template
input:
url: ./skeleton
# copyWithoutRender:
# - .github/workflows/*
values:
component_id: ${{ parameters.component_id }}
description: ${{ parameters.description }}
artifact_id: ${{ parameters.component_id }}
java_package_name: ${{ parameters.java_package_name }}
owner: ${{ parameters.owner }}
destination: ${{ parameters.repoUrl | parseRepoUrl }}
http_port: 8080
containerRegistry: ${{ parameters.containerRegistry }}
imageName: ${{ parameters.imageName }}
imageProject: ${{ parameters.imageProject }}
- id: publish
name: Publish
action: publish:github
input:
allowedHosts: ["github.com"]
description: This is ${{ parameters.component_id }}
repoUrl: ${{ parameters.repoUrl }}
repoVisibility: public
gitCommitMessage: "Scaffolder Magic"
gitAuthorName: "NishkarshRaj"
gitAuthorEmail: "[email protected]"
# token: ${{ secrets.USER_OAUTH_TOKEN }}
- 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 }}
icon: github
- title: Open in catalog
icon: backstage
entityRef: ${{ steps.register.output.entityRef }}