25
25
description : The workspace to create the readme file in
26
26
steps :
27
27
- name : write-new-stuff
28
- image : docker.io/library /ubuntu
28
+ image : mirror.gcr.io /ubuntu
29
29
script : ' touch $(workspaces.source.path)/README.md'
30
30
- name : check-file
31
31
params :
47
47
description : indicates whether the file exists or is missing
48
48
steps :
49
49
- name : check-file
50
- image : docker. io/library/ alpine:3.20.1
50
+ image : mirror.gcr. io/alpine
51
51
script : |
52
52
if test -f $(workspaces.source.path)/$(params.path); then
53
53
printf yes | tee $(results.exists.path)
@@ -60,23 +60,23 @@ spec:
60
60
taskSpec :
61
61
steps :
62
62
- name : echo
63
- image : docker.io/library /ubuntu
63
+ image : mirror.gcr.io /ubuntu
64
64
script : ' echo file exists'
65
65
- name : task-should-be-skipped-1
66
66
when :
67
67
- cel : " '$(tasks.check-file.results.exists)'=='missing'" # when expression using task result, evaluates to false
68
68
taskSpec :
69
69
steps :
70
70
- name : echo
71
- image : docker.io/library /ubuntu
71
+ image : mirror.gcr.io /ubuntu
72
72
script : exit 1
73
73
- name : task-should-be-skipped-2 # when expression using parameter, evaluates to false
74
74
when :
75
75
- cel : " '$(params.path)'!='README.md'"
76
76
taskSpec :
77
77
steps :
78
78
- name : echo
79
- image : docker.io/library /ubuntu
79
+ image : mirror.gcr.io /ubuntu
80
80
script : exit 1
81
81
- name : task-should-be-skipped-3 # task with when expression and run after
82
82
runAfter :
86
86
taskSpec :
87
87
steps :
88
88
- name : echo
89
- image : docker.io/library /ubuntu
89
+ image : mirror.gcr.io /ubuntu
90
90
script : exit 1
91
91
finally :
92
92
- name : finally-task-should-be-skipped-1 # when expression using execution status, evaluates to false
@@ -95,39 +95,39 @@ spec:
95
95
taskSpec :
96
96
steps :
97
97
- name : echo
98
- image : docker.io/library /ubuntu
98
+ image : mirror.gcr.io /ubuntu
99
99
script : exit 1
100
100
- name : finally-task-should-be-skipped-2 # when expression using task result, evaluates to false
101
101
when :
102
102
- cel : " '$(tasks.check-file.results.exists)'=='missing'"
103
103
taskSpec :
104
104
steps :
105
105
- name : echo
106
- image : docker.io/library /ubuntu
106
+ image : mirror.gcr.io /ubuntu
107
107
script : exit 1
108
108
- name : finally-task-should-be-skipped-3 # when expression using parameter, evaluates to false
109
109
when :
110
110
- cel : " '$(params.path)'!='README.md'"
111
111
taskSpec :
112
112
steps :
113
113
- name : echo
114
- image : docker.io/library /ubuntu
114
+ image : mirror.gcr.io /ubuntu
115
115
script : exit 1
116
116
- name : finally-task-should-be-skipped-4 # when expression using tasks execution status, evaluates to false
117
117
when :
118
118
- cel : " '$(tasks.status)'=='Failure'"
119
119
taskSpec :
120
120
steps :
121
121
- name : echo
122
- image : docker.io/library /ubuntu
122
+ image : mirror.gcr.io /ubuntu
123
123
script : exit 1
124
124
- name : finally-task-should-be-skipped-5 # when expression using tasks execution status, evaluates to false
125
125
when :
126
126
- cel : " '$(tasks.status)'=='Succeeded'"
127
127
taskSpec :
128
128
steps :
129
129
- name : echo
130
- image : docker.io/library /ubuntu
130
+ image : mirror.gcr.io /ubuntu
131
131
script : exit 1
132
132
- name : finally-task-should-be-executed # when expression using execution status, tasks execution status, param, and results
133
133
when :
@@ -138,7 +138,7 @@ spec:
138
138
taskSpec :
139
139
steps :
140
140
- name : echo
141
- image : docker.io/library /ubuntu
141
+ image : mirror.gcr.io /ubuntu
142
142
script : ' echo finally done'
143
143
params :
144
144
- name : path
0 commit comments