2525 description : The workspace to create the readme file in
2626 steps :
2727 - name : write-new-stuff
28- image : docker.io/library /ubuntu
28+ image : mirror.gcr.io /ubuntu
2929 script : ' touch $(workspaces.source.path)/README.md'
3030 - name : check-file
3131 params :
4747 description : indicates whether the file exists or is missing
4848 steps :
4949 - name : check-file
50- image : docker. io/library/ alpine:3.20.1
50+ image : mirror.gcr. io/alpine
5151 script : |
5252 if test -f $(workspaces.source.path)/$(params.path); then
5353 printf yes | tee $(results.exists.path)
@@ -60,23 +60,23 @@ spec:
6060 taskSpec :
6161 steps :
6262 - name : echo
63- image : docker.io/library /ubuntu
63+ image : mirror.gcr.io /ubuntu
6464 script : ' echo file exists'
6565 - name : task-should-be-skipped-1
6666 when :
6767 - cel : " '$(tasks.check-file.results.exists)'=='missing'" # when expression using task result, evaluates to false
6868 taskSpec :
6969 steps :
7070 - name : echo
71- image : docker.io/library /ubuntu
71+ image : mirror.gcr.io /ubuntu
7272 script : exit 1
7373 - name : task-should-be-skipped-2 # when expression using parameter, evaluates to false
7474 when :
7575 - cel : " '$(params.path)'!='README.md'"
7676 taskSpec :
7777 steps :
7878 - name : echo
79- image : docker.io/library /ubuntu
79+ image : mirror.gcr.io /ubuntu
8080 script : exit 1
8181 - name : task-should-be-skipped-3 # task with when expression and run after
8282 runAfter :
8686 taskSpec :
8787 steps :
8888 - name : echo
89- image : docker.io/library /ubuntu
89+ image : mirror.gcr.io /ubuntu
9090 script : exit 1
9191 finally :
9292 - name : finally-task-should-be-skipped-1 # when expression using execution status, evaluates to false
@@ -95,39 +95,39 @@ spec:
9595 taskSpec :
9696 steps :
9797 - name : echo
98- image : docker.io/library /ubuntu
98+ image : mirror.gcr.io /ubuntu
9999 script : exit 1
100100 - name : finally-task-should-be-skipped-2 # when expression using task result, evaluates to false
101101 when :
102102 - cel : " '$(tasks.check-file.results.exists)'=='missing'"
103103 taskSpec :
104104 steps :
105105 - name : echo
106- image : docker.io/library /ubuntu
106+ image : mirror.gcr.io /ubuntu
107107 script : exit 1
108108 - name : finally-task-should-be-skipped-3 # when expression using parameter, evaluates to false
109109 when :
110110 - cel : " '$(params.path)'!='README.md'"
111111 taskSpec :
112112 steps :
113113 - name : echo
114- image : docker.io/library /ubuntu
114+ image : mirror.gcr.io /ubuntu
115115 script : exit 1
116116 - name : finally-task-should-be-skipped-4 # when expression using tasks execution status, evaluates to false
117117 when :
118118 - cel : " '$(tasks.status)'=='Failure'"
119119 taskSpec :
120120 steps :
121121 - name : echo
122- image : docker.io/library /ubuntu
122+ image : mirror.gcr.io /ubuntu
123123 script : exit 1
124124 - name : finally-task-should-be-skipped-5 # when expression using tasks execution status, evaluates to false
125125 when :
126126 - cel : " '$(tasks.status)'=='Succeeded'"
127127 taskSpec :
128128 steps :
129129 - name : echo
130- image : docker.io/library /ubuntu
130+ image : mirror.gcr.io /ubuntu
131131 script : exit 1
132132 - name : finally-task-should-be-executed # when expression using execution status, tasks execution status, param, and results
133133 when :
@@ -138,7 +138,7 @@ spec:
138138 taskSpec :
139139 steps :
140140 - name : echo
141- image : docker.io/library /ubuntu
141+ image : mirror.gcr.io /ubuntu
142142 script : ' echo finally done'
143143 params :
144144 - name : path
0 commit comments