File tree Expand file tree Collapse file tree 6 files changed +11
-21
lines changed Expand file tree Collapse file tree 6 files changed +11
-21
lines changed Original file line number Diff line number Diff line change 1
1
{ {- define " common_steps" -} }
2
+ { {- $script := index . 2 -} }
2
3
{ {- $workspace := index . 1 -} }
3
4
{ {- with index . 0 -} }
4
5
- name: prepare-and-run
10
11
workingDir: $(workspaces.output.path)
11
12
{ {- end } }
12
13
script: |
13
- { {- include " load_scripts" ( list . ( list " " ) ( list " /scripts/prepare.sh" " /scripts/git-run.sh" ) ) | nindent 4 } }
14
+ { {- include " load_scripts" ( list . ( list " " ) ( list " /scripts/prepare.sh" " /scripts/git-run.sh" $ script ) ) | nindent 4 } }
14
15
volumeMounts:
15
16
- name: scripts-dir
16
17
mountPath: /scripts
Original file line number Diff line number Diff line change @@ -14,12 +14,13 @@ set -e
14
14
printf '%s' "{ { $content | toString | b64enc } }" |base64 -d >"/scripts/{ { $name } }"
15
15
{ {- end } }
16
16
{ {- end } }
17
- ls /scripts/{ { $prefix } }*.sh;
18
17
chmod +x /scripts/{ { $prefix } }*.sh;
19
18
{ {- end } }
20
19
21
20
{ {- range $i , $script := index . 2 -} }
21
+ { {- if ne $script " " -} }
22
22
echo "Running Script { { $script } }";
23
- { { $script } };
23
+ { { $script } };
24
+ { {- end -} }
24
25
{ {- end } }
25
26
{ {- end -} }
Original file line number Diff line number Diff line change 3
3
{ {- $params := index . 2 -} }
4
4
{ {- $results := index . 3 -} }
5
5
{ {- $env_vars := index . 4 -} }
6
- { {- $steps := index . 5 -} }
6
+ { {- $script := index . 5 -} }
7
7
{ {- $workspace := index . 6 -} }
8
8
{ {- with index . 0 -} }
9
9
workspaces:
@@ -47,10 +47,7 @@ stepTemplate:
47
47
{ {- end } }
48
48
49
49
steps:
50
- { {- include " common_steps" ( list . $workspace ) | nindent 2 } }
51
- { {- if ne $steps " " } }
52
- { {- include $steps . | nindent 2} }
53
- { {- end} }
50
+ { {- include " common_steps" ( list . $workspace $script ) | nindent 2 } }
54
51
55
52
{ {- end -} }
56
53
{ {- end -} }
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 7
7
" params.GIT_SCRIPT"
8
8
" workspaces.source.path"
9
9
}}
10
- {{ $steps := "" -}}
10
+ {{ $script := "" -}}
11
11
---
12
12
apiVersion : tekton.dev/v1
13
13
kind : Task
27
27
the task. This task needs authentication to git in order to push
28
28
after the git operation.
29
29
30
- {{ include "spec_git" ( list . $workspaces $params $results $env_vars $steps "source" ) | nindent 2 }}
30
+ {{ include "spec_git" ( list . $workspaces $params $results $env_vars $script "source" ) | nindent 2 }}
Original file line number Diff line number Diff line change 12
12
" results.URL.path"
13
13
" workspaces.output.path"
14
14
}}
15
- {{- $steps := "steps_git_clone " -}}
15
+ {{- $script := "/scripts/report.sh " -}}
16
16
---
17
17
apiVersion : tekton.dev/v1
18
18
kind : Task
28
28
description : |
29
29
{{ .Chart.Description }}
30
30
31
- {{ include "spec_git" ( list . $workspaces $params $results $env_vars $steps "output" ) | nindent 2 }}
31
+ {{ include "spec_git" ( list . $workspaces $params $results $env_vars $script "output" ) | nindent 2 }}
You can’t perform that action at this time.
0 commit comments