forked from Kounex/summit-connect-challenge-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.yaml
105 lines (99 loc) · 3.58 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
apiVersion: scaffolder.backstage.io/v1beta3
kind: Template
metadata:
name: user1-summit-connect-challenge-template
title: USER1 Summit Connect Challenge
description: Deploy an example application via self-service over Developer Hub
tags:
- summit-connect
- challenge
- flutter
spec:
owner: rhdh
type: service
parameters:
- title: Provide information for GitLab
required:
- gitlabGroup
properties:
gitlabGroup:
title: GitLab Group
type: string
description: Your GitLab group
default: development
enum:
- development
description:
title: Description
type: string
description: Help others understand what this service is for
default: Create and deploy the summit-connect-challenge app with ArgoCD over Developer Hub
- title: Provide information about the new service
required:
- clusterId
- namespace
- env
properties:
clusterId:
title: Cluster Id
type: string
description: Id of the cluster (check your URL starting at apps.)
default: apps.cluster-fzrsh.fzrsh.sandbox568.opentlc.com
namespace:
title: Namespace
type: string
description: In which namespace the application should be deployed
env:
title: Environment
type: string
description: Environment of our App
steps:
- id: templateGitOps
name: Generating the deployment resources and artifacts
action: fetch:template
input:
url: ./manifests
copyWithoutTemplating: []
values:
componentId: summit-connect-challenge
description: ${{parameters.description}}
sourceRepository: https://gitlab-gitlab.${{parameters.clusterId}}/${{parameters.gitlabGroup}}/${{parameters.namespace}}-summit-connect-challenge.git
defaultBranch: main
clusterId: ${{parameters.clusterId}}
namespace: ${{parameters.namespace}}
user: ${{user.entity.metadata.name}}
gitlabGroup: ${{parameters.gitlabGroup}}
env: ${{parameters.env}}
targetPath: ./tenant-gitops
- id: publishGitOps
name: Publishing to Deployment Resource Repository
action: publish:gitlab
input:
allowedHosts:
- gitlab.com
repoUrl: gitlab-gitlab.${{parameters.clusterId}}?owner=${{parameters.gitlabGroup}}&repo=${{parameters.namespace}}-summit-connect-challenge
title: GitOps resources for ${{parameters.namespace}}-summit-connect-challenge
description: GitOps resources for ${{parameters.namespace}}-summit-connect-challenge
sourcePath: ./tenant-gitops
defaultBranch: main
protectDefaultBranch: false
repoVisibility: public
- id: createArgoResources
name: Create ArgoCD Resources
action: argocd:create-resources
input:
appName: ${{parameters.namespace}}-summit-connect-challenge-bootstrap
argoInstance: main
namespace: janus-argocd
repoUrl: https://gitlab-gitlab.${{parameters.clusterId}}/${{parameters.gitlabGroup}}/${{parameters.namespace}}-summit-connect-challenge.git
path: 'argocd/'
- id: registerComponent
name: Registering the GitOps Component
action: catalog:register
input:
repoContentsUrl: ${{steps.publishGitOps.output.repoContentsUrl}}
output:
links:
- title: Open Component in catalog
icon: catalog
entityRef: ${{steps.registerComponent.output.entityRef}}