-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathstep.yml
107 lines (107 loc) · 3.62 KB
/
step.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
version: '1.0'
kind: step-type
metadata:
name: datree/datree-policy-check
version: 0.0.4
isPublic: true
description: >-
This action runs the Datree CLI against given k8s configuration file/s in your repository, featuring full Helm and Kustomize support.
sources:
- 'https://github.com/datreeio/codefresh-datree'
stage: incubating
maintainers:
- name: Hadar Cohen
email: [email protected]
categories:
- stability
official: false
tags: [kubernetes, k8s]
icon:
type: svg
url: 'https://raw.githubusercontent.com/datreeio/datree/main/images/datree-logo.svg'
background: '#f4f4f4'
examples:
- description: Basic yaml
workflow:
datree-policy-check:
title: Run Datree policy check
type: datree/datree-policy-check
arguments:
DATREE_TOKEN: "${{DATREE_TOKEN}}"
INPUT_PATH: "fileName.yaml"
- description: Helm chart
workflow:
datree-policy-check:
title: Run Datree policy check
type: datree/datree-policy-check
arguments:
DATREE_TOKEN: "${{DATREE_TOKEN}}"
INPUT_PATH: "my/chart/directory"
IS_HELM_CHART: true
HELM_ARGUMENTS: "--values values.yaml"
latest: true
id:
spec:
arguments: |-
{
"definitions": {},
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"additionalProperties": false,
"patterns": [],
"required": [
"DATREE_TOKEN",
"INPUT_PATH"
],
"properties": {
"WORKING_DIRECTORY": {
"type": "string",
"description": "The directory to which the repository is cloned. It can be an explicit path in the container’s file system, or a variable that references another step. The default value is '/codefresh/volume/${{CF_REPO_NAME}}'",
"default": "/codefresh/volume/${{CF_REPO_NAME}}"
},
"DATREE_TOKEN": {
"type": "string",
"description": "Datree account token"
},
"INPUT_PATH": {
"type": "string",
"description": "File/s to be tested"
},
"CLI_ARGUMENTS": {
"type": "string",
"description": "Datree CLI arguments as specified here: https://hub.datree.io/setup/cli-arguments#flags",
"default": ""
},
"IS_HELM_CHART": {
"type": ["boolean"],
"description": "Is the desired path a Helm chart?"
},
"HELM_ARGUMENTS": {
"type": "string",
"description": "The Helm arguments to be used, if the path is a Helm chart",
"default": ""
},
"IS_KUSTOMIZATION": {
"type": "boolean",
"description": "Is the desired path a Kustomization?"
},
"KUSTOMIZE_ARGUMENTS": {
"type": "string",
"description": "The Kustomize arguments to be used, if the path is a Kustomization",
"default": ""
}
}
}
steps:
main:
name: datree-policy-check
image: 'datree/codefresh-datree'
environment:
- 'WORKING_DIRECTORY=${{WORKING_DIRECTORY}}'
- 'DATREE_TOKEN=${{DATREE_TOKEN}}'
- 'INPUT_PATH=${{INPUT_PATH}}'
- 'CLI_ARGUMENTS=${{CLI_ARGUMENTS}}'
- 'IS_HELM_CHART=${{IS_HELM_CHART}}'
- 'HELM_ARGUMENTS=${{HELM_ARGUMENTS}}'
- 'IS_KUSTOMIZATION=${{IS_KUSTOMIZATION}}'
- 'KUSTOMIZE_ARGUMENTS=${{KUSTOMIZE_ARGUMENTS}}'