/
fieldExtension.yaml
109 lines (109 loc) · 3.12 KB
/
fieldExtension.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
apiVersion: scaffolder.backstage.io/v1beta3
kind: Template
metadata:
name: fieldExtension
title: Field Extension Template Action
description: An template for the scaffolder that creates a Django service
tags:
- django
- harness
spec:
owner: bhavya.sinha@harness.io
type: service
parameters:
- title: Django Service Details
required:
- name
- repository
- isPublish
properties:
name:
title: Name of your Django Service
type: string
description: Unique name of the service
repository:
title: Name of the Repository
type: string
description: This will be the name of Repository on Github
isPublish:
title: Do you wish to publish the internal registry?
type: boolean
token:
title: Harness Token
type: string
ui:widget: password
ui:field: HarnessAuthToken
- title: Service Infrastructure Details
required:
- provider
- db
- cache
- lint
- owner
- projectId
- orgId
properties:
provider:
title: Choose a cloud provider for Deployment
type: string
enum: ['GCP', 'AWS']
default: GCP
db:
title: Choose a Database Type for the Service
type: string
enum: ['None', 'MySQL', 'Postgres', 'MongoDB']
default: None
cache:
title: Choose a caching system for the Service
type: string
enum: ['None', 'Redis']
default: None
lint:
title: Choose a Python linter for the Service
type: string
enum: ['None', 'Black', 'Flake8']
default: None
owner:
title: Choose an Owner for the Service
type: string
ui:field: OwnerPicker
ui:options:
allowedKinds:
- Group
projectId:
title: Project Identifier
description: Harness Project Identifier
type: string
ui:field: HarnessProjectPicker
orgId:
title: Org Identifier
type: string
ui:field: HarnessOrgPicker
secretValue:
title: Secret Value
type: string
ui:widget: password
steps:
- id: createsecret
name: Create Harness Secret
action: harness:create-secret
input:
projectId: ${{ parameters.projectId }}
orgId: ${{ parameters.orgId }}
secretValue: ${{ parameters.secretValue }}
apikey: ${{ parameters.token }}
- id: deletesecret
name: Deletes a Harness Secret
action: harness:delete-secret
input:
projectId: ${{ parameters.projectId }}
orgId: ${{ parameters.orgId }}
secretId: ${{ steps.createsecret.output.secretId }}
apikey: ${{ parameters.token }}
output:
links:
- title: Pipeline Details
url: ${{ steps.trigger.output.PipelineUrl }}
- title: Open in catalog
icon: catalog
entityRef: ${{ steps.register.output.entityRef }}