-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstep.yaml
116 lines (116 loc) · 3.8 KB
/
step.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
kind: step-type
version: '1.0'
metadata:
name: digitonic/cloudflare-cname
version: 0.0.1
isPublic: true
description: Based on the branch name it will create a cname in clouflare using the ELB in the web service.
sources:
- 'https://github.com/digitonic/cloudflare-cname'
stage: incubating
maintainers:
- name: Daniele Bicelli
categories:
- utility
official: false
tags: []
icon:
type: image
size:
large:
url: >-
https://cdn-codefresh-steps.s3-eu-west-1.amazonaws.com/cf-logo-v-rgb-rev.png
examples:
- description: example-1
workflow:
version: '1.0'
steps:
cloudflare:
stage: "deploy"
type: cloudflare-cname
arguments:
KUBE_CONTEXT: ${{KUBE_CONTEXT}}
CLOUD_FLARE_EMAIL: ${{CLOUD_FLARE_EMAIL}}
CLOUD_FLARE_API_KEY: ${{CLOUD_FLARE_API_KEY}}
CLOUD_FLARE_ZONE: ${{CLOUD_FLARE_ZONE}}
RECORD_DOMAIN: ${{RECORD_DOMAIN}}
NAMESPACE: ${{NAMESPACE}}
DEPLOYMENT: ${{DEPLOYMENT}}
DEPLOYMENT_TARGET: ${{DEPLOYMENT_TARGET}}
DELETE_RECORD: ${{DELETE_RECORD}}
RECORD_NAME: ${{RECORD_NAME}}
spec:
arguments: |-
{
"definitions": {},
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"additionalProperties": false,
"patterns": [],
"required": [
"KUBE_CONTEXT",
"CLOUD_FLARE_EMAIL",
"CLOUD_FLARE_API_KEY",
"CLOUD_FLARE_ZONE",
"RECORD_DOMAIN",
"NAMESPACE",
"DEPLOYMENT",
"RECORD_NAME"
],
"properties": {
"KUBE_CONTEXT": {
"type": "string",
"description": "Kubernetes context to use (the name of the cluster as configured in Codefresh) (required)"
},
"CLOUD_FLARE_EMAIL": {
"type": "string",
"description": "The email in cloudflare"
},
"CLOUD_FLARE_API_KEY": {
"type": "string",
"description": "The api in cloudfare"
},
"CLOUD_FLARE_ZONE": {
"type": "string",
"description": "The zone id of the domain in cloudflare"
},
"RECORD_DOMAIN": {
"type": "string",
"description": "The suffix of the domain for example digitonic.co.uk"
},
"NAMESPACE": {
"type": "string",
"description": "Namespace of the deployment"
},
"DEPLOYMENT": {
"type": "string",
"description": "Name of the deployment typically web"
},
"DEPLOYMENT_TARGET": {
"type": "string",
"description": "Overrider Name of the deployment typically web"
},
"DELETE_RECORD": {
"type": "number",
"description": "If set step will delete a record rather than adding it"
},
"RECORD_NAME": {
"type": "string",
"description": "Value that will be used as record name use CF_BRANCH_TAG_NORMALIZED."
}
}
}
steps:
main:
name: cloudflare-cname
image: 'digitonic/cloudflare-cname:latest'
environment:
- 'KUBE_CONTEXT=${{KUBE_CONTEXT}}'
- 'CLOUD_FLARE_EMAIL=${{CLOUD_FLARE_EMAIL}}'
- 'CLOUD_FLARE_API_KEY=${{CLOUD_FLARE_API_KEY}}'
- 'CLOUD_FLARE_ZONE=${{CLOUD_FLARE_ZONE}}'
- 'RECORD_DOMAIN=${{RECORD_DOMAIN}}'
- 'NAMESPACE=${{NAMESPACE}}'
- 'DEPLOYMENT=${{DEPLOYMENT}}'
- 'RECORD_NAME=${{RECORD_NAME}}'
- 'DELETE_RECORD=${{DELETE_RECORD}}'