-
Notifications
You must be signed in to change notification settings - Fork 1
/
portWorkflowTemplate.yml
138 lines (138 loc) · 4.88 KB
/
portWorkflowTemplate.yml
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
apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
name: port
annotations:
spec:
templates:
- name: entity-get
serviceAccountName: port-executor
metadata:
annotations:
port/description: "Get a Port Entity according to the provided values"
inputs:
parameters:
- name: PORT_CREDENTIALS_SECRET
default: port-credentials
- name: PORT_CLIENT_ID_KEY
default: PORT_CLIENT_ID
- name: PORT_CLIENT_SECRET_KEY
default: PORT_CLIENT_SECRET
- name: BLUEPRINT_IDENTIFIER
- name: ENTITY_IDENTIFIER
container:
name: main
imagePullPolicy: Always
image: public.ecr.aws/y8q1v8m0/codefresh-port-entity:1.1.0
command:
- node
- lib/index.js
env:
- name: OPERATION
value: "get"
- name: PORT_CLIENT_ID
valueFrom:
secretKeyRef:
name: "{{ inputs.parameters.PORT_CREDENTIALS_SECRET }}"
key: "{{ inputs.parameters.PORT_CLIENT_ID_KEY }}"
- name: PORT_CLIENT_SECRET
valueFrom:
secretKeyRef:
name: "{{ inputs.parameters.PORT_CREDENTIALS_SECRET }}"
key: "{{ inputs.parameters.PORT_CLIENT_SECRET_KEY }}"
- name: BLUEPRINT_IDENTIFIER
value: "{{ inputs.parameters.BLUEPRINT_IDENTIFIER }}"
- name: ENTITY_IDENTIFIER
value: "{{ inputs.parameters.ENTITY_IDENTIFIER }}"
outputs:
parameters:
- name: PORT_COMPLETE_ENTITY
valueFrom:
path: /tmp/portvars/PORT_COMPLETE_ENTITY
globalName: PORT_COMPLETE_ENTITY
- name: PORT_BLUEPRINT_IDENTIFIER
valueFrom:
path: /tmp/portvars/PORT_BLUEPRINT_IDENTIFIER
globalName: PORT_BLUEPRINT_IDENTIFIER
- name: PORT_ENTITY_IDENTIFIER
valueFrom:
path: /tmp/portvars/PORT_ENTITY_IDENTIFIER
globalName: PORT_ENTITY_IDENTIFIER
- name: PORT_ENTITY_TITLE
valueFrom:
path: /tmp/portvars/PORT_ENTITY_TITLE
globalName: PORT_ENTITY_TITLE
- name: PORT_ENTITY_PROPERTIES
valueFrom:
path: /tmp/portvars/PORT_ENTITY_PROPERTIES
globalName: PORT_ENTITY_PROPERTIES
- name: PORT_ENTITY_RELATIONS
valueFrom:
path: /tmp/portvars/PORT_ENTITY_RELATIONS
globalName: PORT_ENTITY_RELATIONS
- name: entity-upsert
serviceAccountName: port-executor
metadata:
annotations:
port/description: "Upsert a Port Entity according to the provided values"
inputs:
parameters:
- name: PORT_CREDENTIALS_SECRET
default: port-credentials
- name: PORT_CLIENT_ID_KEY
default: PORT_CLIENT_ID
- name: PORT_CLIENT_SECRET_KEY
default: PORT_CLIENT_SECRET
- name: BLUEPRINT_IDENTIFIER
- name: ENTITY_IDENTIFIER
default: ""
- name: ENTITY_TITLE
default: ""
- name: ENTITY_TEAM
default: ""
- name: ENTITY_ICON
default: ""
- name: ENTITY_PROPERTIES
default: ""
- name: ENTITY_RELATIONS
default: ""
container:
name: main
imagePullPolicy: Always
image: public.ecr.aws/y8q1v8m0/codefresh-port-entity:1.1.0
command:
- node
- lib/index.js
env:
- name: OPERATION
value: "upsert"
- name: PORT_CLIENT_ID
valueFrom:
secretKeyRef:
name: "{{ inputs.parameters.PORT_CREDENTIALS_SECRET }}"
key: "{{ inputs.parameters.PORT_CLIENT_ID_KEY }}"
- name: PORT_CLIENT_SECRET
valueFrom:
secretKeyRef:
name: "{{ inputs.parameters.PORT_CREDENTIALS_SECRET }}"
key: "{{ inputs.parameters.PORT_CLIENT_SECRET_KEY }}"
- name: BLUEPRINT_IDENTIFIER
value: "{{ inputs.parameters.BLUEPRINT_IDENTIFIER }}"
- name: ENTITY_IDENTIFIER
value: "{{ inputs.parameters.ENTITY_IDENTIFIER }}"
- name: ENTITY_TITLE
value: "{{ inputs.parameters.ENTITY_TITLE }}"
- name: ENTITY_TEAM
value: "{{ inputs.parameters.ENTITY_TEAM }}"
- name: ENTITY_ICON
value: "{{ inputs.parameters.ENTITY_ICON }}"
- name: ENTITY_PROPERTIES
value: "{{ inputs.parameters.ENTITY_PROPERTIES }}"
- name: ENTITY_RELATIONS
value: "{{ inputs.parameters.ENTITY_RELATIONS }}"
outputs:
parameters:
- name: PORT_ENTITY_IDENTIFIER
valueFrom:
path: /tmp/portvars/PORT_ENTITY_IDENTIFIER
globalName: PORT_ENTITY_IDENTIFIER