-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplugin.yml
More file actions
134 lines (134 loc) · 3.77 KB
/
plugin.yml
File metadata and controls
134 lines (134 loc) · 3.77 KB
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
version: '1.0'
kind: step-type
metadata:
name: globetracker/dynamic-1d-matrix-freestyle
isPublic: true
description: |-
This generates a dynamic 1D matrix of freestyle steps
sources:
- 'https://github.com/globe-tracker/cf-step-dynamic-matrix.git'
stage: incubating
maintainers:
- name: Julius Biskopstø
categories:
- git
official: false
tags: []
icon:
type: svg
url: https://raw.githubusercontent.com/globe-tracker/cf-step-dynamic-matrix/main/locator.svg
background: '#f4f4f4'
examples:
- description: example-1
workflow:
version: '1.0'
steps:
say_hello:
title: Running multiple dynamic commands
type: globetracker/dynamic-1d-matrix-freestyle
arguments:
NAME: "say_hello"
IMAGE: "alpine"
STAGE: "ci"
WORKING_DIRECTORY: "${{CF_VOLUME_PATH}}"
ENVIRONMENT:
- "BRANCH=${{CF_BRANCH}}"
COMMANDS:
- "echo 'Hello %VALUE% on $BRANCH'"
VALUES: "project1,project2,project3"
- description: example-2
workflow:
version: '1.0'
steps:
say_hello:
title: Running multiple dynamic commands
type: globetracker/dynamic-1d-matrix-freestyle
arguments:
NAME: "say_hello2"
IMAGE: "alpine"
STAGE: "ci"
COMMANDS:
- "echo 'Hello %VALUE% on $BRANCH'"
VALUES: "project1,project2,project3"
DEPENDS:
- "say_hello_step"
latest: true
version: 1.0.10
spec:
arguments: |-
{
"definitions": {},
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"additionalProperties": false,
"patterns": [],
"required": [
"NAME",
"IMAGE",
"STAGE",
"COMMANDS",
"VALUES"
],
"properties": {
"NAME": {
"type": "string",
"description": "The name of the dynamic steps, index will be added"
},
"IMAGE": {
"type": "string",
"description": "what image should be used for the steps in the matrix"
},
"STAGE": {
"type": "string",
"description": "what stage in the pipeline is this matrix running in"
},
"COMMANDS": {
"type": "array",
"description": "Set the number of "
},
"VALUES": {
"description": "A list/array of index values",
"type": "string"
},
"DEPENDS": {
"type": "array",
"description": "list of dependent steps",
"items": {
"type": "string"
}
},
"ENVIRONMENT": {
"type": "array",
"description": "list of environment variables",
"items": {
"type": "string"
}
},
"WORKING_DIRECTORY": {
"type": "string",
"description": "working directory"
}
}
}
delimiters:
left: '[['
right: ']]'
stepsTemplate: |-
print_info_message:
name: globetracker-cf/dynamic-matrix
title: Info message
image: alpine
commands:
- echo "Creating [[ .Arguments.NAME ]], a dynamic 1 dimensional matrix of [[ strings.Split "," .Arguments.VALUES | len ]] values"
some_parallel_task:
type: parallel
stage: [[ .Arguments.STAGE ]]
steps:
[[- range $index, $value := strings.Split "," .Arguments.VALUES ]]
print_info[[ $index ]]:
title: Info message
type: freestyle
image: alpine
commands:
- echo "echo [[ $value ]] [[ $.Arguments.NAME ]]"
[[- end ]]