forked from vfarcic/crossplane-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbackstage-template.yaml
73 lines (73 loc) · 1.98 KB
/
backstage-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
apiVersion: scaffolder.backstage.io/v1beta3
kind: Template
metadata:
name: crossplane-app
title: Crossplane App
description: Create and Manage Applications
spec:
owner: vfarcic/crossplane-app
type: service
parameters:
- title: Service Definition
properties:
name:
type: string
ui:autofocus: true
namespace:
type: string
default: production
image:
type: string
port:
type: integer
default: 80
host:
type: string
default: devopstoolkit.live
db:
type: object
properties:
secret:
type: string
required:
- image
steps:
- id: log-message
name: Log Message
action: debug:log
input:
message: Created the manifest for the ${{ parameters.name }} application.
- id: fetch-template
action: fetch:template
name: Generate manifest
input:
url: manifest-templates
targetPath: manifests
values:
name: ${{ parameters.name }}
namespace: ${{ parameters.namespace }}
image: ${{ parameters.image }}
port: ${{ parameters.port }}
host: ${{ parameters.host }}
db:
secret: ${{ parameters.db.secret }}
- id: rename-manifest
action: fs:rename
name: Rename files
input:
files:
- from: backstage/manifest-template.yaml
to: manifests/app-claim-${{ parameters.name }}.yaml
- id: create-pull-request
action: publish:github:pull-request
name: Create a pull request
input:
repoUrl: github.com?repo=${{ parameters.repository }}&owner=${{ parameters.repositoryUser }}
branchName: cluster-${{ parameters.name }}
gitCommitMessage: Kubernetes cluster
title: App manifest ${{ parameters.name }}
description: This pull request creates the app-claim-${{ parameters.name }}.yaml application manifest.
output:
links:
- title: Pull Request
url: ${{ steps['create-pull-request'].output.remoteUrl }}