Skip to content

Commit

Permalink
use tagged images
Browse files Browse the repository at this point in the history
Replace latest tag with the latest version and tag the image to avoid
k8s default image pull policy. The policy is:

* if you omit the imagePullPolicy field, and the tag for the container image is
  :latest, imagePullPolicy is automatically set to Always
* if you omit the imagePullPolicy field, and you don't specify the tag for the
  container image, imagePullPolicy is automatically set to Always

With this change, we are relying on the following policy:

* if you omit the imagePullPolicy field, and you specify the tag for the container
  image that isn't :latest, the imagePullPolicy is automatically set to IfNotPresent.

Signed-off-by: Priti Desai <[email protected]>
  • Loading branch information
pritidesai authored and tekton-robot committed Jul 18, 2024
1 parent c5ea9cf commit 38f2cb5
Show file tree
Hide file tree
Showing 100 changed files with 266 additions and 266 deletions.
4 changes: 2 additions & 2 deletions examples/v1/pipelineruns/4808-regression.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ spec:
type: string
steps:
- name: print-result
image: docker.io/library/bash:latest
image: docker.io/library/bash:5.2.26
env:
- name: PARAM_TO_PRINT
value: $(params.TO_PRINT)
Expand Down Expand Up @@ -39,7 +39,7 @@ spec:
description: A result string
steps:
- name: gen-result
image: docker.io/library/bash:latest
image: docker.io/library/bash:5.2.26
env:
- name: PARAM_STRING_LENGTH
value: $(params.STRING_LENGTH)
Expand Down
6 changes: 3 additions & 3 deletions examples/v1/pipelineruns/6139-regression.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spec:
results:
- name: result-one
steps:
- image: docker.io/library/alpine
- image: docker.io/library/alpine:3.20.1
script: |
#!/bin/sh
echo "Hello world!"
Expand All @@ -28,7 +28,7 @@ spec:
results:
- name: result-two
steps:
- image: docker.io/library/alpine
- image: docker.io/library/alpine:3.20.1
script: |
#!/bin/sh
echo "Goodbye world!"
Expand All @@ -43,7 +43,7 @@ spec:
results:
- name: result-three
steps:
- image: docker.io/library/alpine
- image: docker.io/library/alpine:3.20.1
script: |
#!/bin/sh
echo "Shutdown world!"
Expand Down
2 changes: 1 addition & 1 deletion examples/v1/pipelineruns/alpha/param-enum.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ spec:
enum: ["v1", "v2", "v3"]
steps:
- name: build
image: docker.io/library/bash:latest
image: docker.io/library/bash:5.2.26
script: |
echo "$(params.message)"
---
Expand Down
4 changes: 2 additions & 2 deletions examples/v1/pipelineruns/alpha/pipelinerun-large-results.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ spec:
type: string
steps:
- name: step1
image: docker.io/library/alpine
image: docker.io/library/alpine:3.20.1
script: |
# produce a result - a random string with 2,500 characters - result1
tr -dc A-Za-z0-9 </dev/urandom | head -c 2500 | tee $(results.result1.path);
Expand Down Expand Up @@ -63,7 +63,7 @@ spec:
type: string
steps:
- name: step1
image: docker.io/library/alpine
image: docker.io/library/alpine:3.20.1
args: [
"$(params.param3[*])"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ spec:
description: indicates whether the file exists or is missing
steps:
- name: check-file
image: docker.io/library/alpine
image: docker.io/library/alpine:3.20.1
script: |
if test -f $(workspaces.source.path)/$(params.path); then
printf yes | tee $(results.exists.path)
Expand Down
2 changes: 1 addition & 1 deletion examples/v1/pipelineruns/alpha/stepaction-params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ spec:
key1: "step-action default key1"
key2: "step-action default key2"
key3: "step-action default key3"
image: docker.io/library/bash:3.2
image: docker.io/library/bash:5.2.26
args: [
"echo",
"$(params.array-param[*])",
Expand Down
4 changes: 2 additions & 2 deletions examples/v1/pipelineruns/beta/7392-regression.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ spec:
default: []
steps:
- name: step1
image: docker.io/library/bash:latest
image: docker.io/library/bash:5.2.26
args:
- --images
- $(params.arrayVal1[*])
Expand All @@ -20,7 +20,7 @@ spec:
echo $arg
done
- name: step2
image: docker.io/library/bash:latest
image: docker.io/library/bash:5.2.26
script: |
#!/usr/bin/env bash
echo -n '[]' | tee $(results.resultArray.path)
Expand Down
4 changes: 2 additions & 2 deletions examples/v1/pipelineruns/beta/ignore-task-error.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ spec:
taskSpec:
steps:
- name: write
image: docker.io/library/alpine
image: docker.io/library/alpine:3.20.1
script: |
echo "this is a failing task"
exit 1
Expand All @@ -20,6 +20,6 @@ spec:
taskSpec:
steps:
- name: write
image: docker.io/library/alpine
image: docker.io/library/alpine:3.20.1
script: |
echo "this is a success task"
4 changes: 2 additions & 2 deletions examples/v1/pipelineruns/beta/isolated-workspaces.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ spec:
workspaces:
- name: creds
steps:
- image: docker.io/library/alpine:3.12.0
- image: docker.io/library/alpine:3.20.1
script: |
if [ ! -d /creds ] ; then
echo "unable to access creds"
Expand All @@ -46,7 +46,7 @@ spec:
workspaces:
- name: creds
mountpath: /creds
- image: docker.io/library/alpine:3.12.0
- image: docker.io/library/alpine:3.20.1
script: |
if [ -d /workspace/creds ] ; then
echo "this step should not be able to see creds"
Expand Down
4 changes: 2 additions & 2 deletions examples/v1/pipelineruns/beta/pipeline-emitting-results.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spec:
description: The array results
steps:
- name: write-array
image: docker.io/library/bash:latest
image: docker.io/library/bash:5.2.26
script: |
#!/usr/bin/env bash
echo -n "[\"1\",\"2\",\"3\"]" | tee $(results.array-results.path)
Expand All @@ -32,7 +32,7 @@ spec:
}
steps:
- name: write-array
image: docker.io/library/bash:latest
image: docker.io/library/bash:5.2.26
script: |
#!/usr/bin/env bash
echo -n "{\"foo\":\"bar\",\"hello\":\"world\"}" | tee $(results.object-results.path)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ spec:
description: The array results
steps:
- name: write-array
image: docker.io/library/bash:latest
image: docker.io/library/bash:5.2.26
script: |
#!/usr/bin/env bash
image1="abc.dev/notsofamousimage/image"
Expand All @@ -34,7 +34,7 @@ spec:
taskSpec:
steps:
- name: say-hi
image: docker.io/library/bash:latest
image: docker.io/library/bash:5.2.26
script: |
echo "hi"
- name: task3
Expand All @@ -50,7 +50,7 @@ spec:
taskSpec:
steps:
- name: say-hello
image: docker.io/library/bash:latest
image: docker.io/library/bash:5.2.26
script: |
echo "hello"
- name: task4
Expand All @@ -62,7 +62,7 @@ spec:
taskSpec:
steps:
- name: say-hi
image: docker.io/library/bash:latest
image: docker.io/library/bash:5.2.26
script: |
echo "hi"
- name: task5
Expand All @@ -74,15 +74,15 @@ spec:
taskSpec:
steps:
- name: do-not-execute
image: docker.io/library/bash:latest
image: docker.io/library/bash:5.2.26
script: |
exit 1
finally:
- name: validate-tasks
taskSpec:
steps:
- name: validate-tasks-section
image: docker.io/library/bash:latest
image: docker.io/library/bash:5.2.26
script: |
if [[ $(context.task2.status) != "Succeeded" ]]; then
echo "task2 should have been succeeded but instead has status - $(context.task2.status)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ spec:
- name: url
steps:
- name: echo
image: docker.io/library/alpine
image: docker.io/library/alpine:3.20.1
script: |
echo "Visit $(params.url) on $(params.platform) using $(params.browser)."
---
Expand All @@ -32,7 +32,7 @@ spec:
type: array
steps:
- name: produce-a-list-of-platforms
image: docker.io/library/bash:latest
image: docker.io/library/bash:5.2.26
script: |
#!/usr/bin/env bash
echo -n "[\"linux\",\"mac\",\"windows\"]" | tee $(results.platforms.path)
Expand All @@ -44,12 +44,12 @@ spec:
- name: url
steps:
- name: produce-a-list-of-browsers
image: docker.io/library/bash:latest
image: docker.io/library/bash:5.2.26
script: |
#!/usr/bin/env bash
echo -n "[\"chrome\",\"safari\",\"firefox\"]" | tee $(results.browsers.path)
- name: produce-url
image: docker.io/library/bash:latest
image: docker.io/library/bash:5.2.26
script: |
#!/usr/bin/env bash
echo -n "myfavoritesitedotcom" | tee $(results.url.path)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spec:
default: ""
steps:
- name: echo
image: docker.io/library/alpine
image: docker.io/library/alpine:3.20.1
script: |
echo "$(params.platform) and $(params.browser)"
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
type: string
steps:
- name: validate
image: docker.io/library/alpine
image: docker.io/library/alpine:3.20.1
args: ["$(params.matrixlength)"]
script: |
#!/usr/bin/env sh
Expand All @@ -32,7 +32,7 @@ spec:
type: string
steps:
- name: validate
image: docker.io/library/alpine
image: docker.io/library/alpine:3.20.1
script: |
#!/usr/bin/env sh
echo "Validating the length of the matrix results context variable"
Expand Down Expand Up @@ -61,7 +61,7 @@ spec:
- name: IMAGE-URL
steps:
- name: produce-results
image: docker.io/library/bash:latest
image: docker.io/library/bash:5.2.26
script: |
#!/usr/bin/env bash
echo "Building image for $(params.IMAGE)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
type: string
steps:
- name: echo
image: docker.io/library/alpine
image: docker.io/library/alpine:3.20.1
script: |
echo "$(params.url)"
---
Expand Down Expand Up @@ -60,7 +60,7 @@ spec:
type: string
steps:
- name: produce-report-url
image: docker.io/library/alpine
image: docker.io/library/alpine:3.20.1
script: |
echo "Running tests on $(params.platform)-$(params.browser)"
echo -n "https://api.example/get-report/$(params.platform)-$(params.browser)" | tee $(results.report-url.path)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ spec:
- name: DOCKERFILE
steps:
- name: echo
image: docker.io/library/alpine
image: docker.io/library/alpine:3.20.1
script: |
echo "$(params.IMAGE) and $(params.DOCKERFILE)"
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
default: ''
steps:
- name: echo
image: docker.io/library/alpine
image: docker.io/library/alpine:3.20.1
script: |
echo $(params.GOARCH) and $(params.version) flags? $(params.flags) context? $(params.context) package? $(params.package)
---
Expand Down
4 changes: 2 additions & 2 deletions examples/v1/pipelineruns/beta/pipelinerun-with-matrix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ spec:
- name: browser
steps:
- name: echo
image: docker.io/library/alpine
image: docker.io/library/alpine:3.20.1
script: |
echo "$(params.platform) and $(params.browser)"
---
Expand Down Expand Up @@ -108,7 +108,7 @@ spec:
- name: version
- name: pipelineTask-retries
steps:
- image: docker.io/library/alpine
- image: docker.io/library/alpine:3.20.1
script: |
#!/usr/bin/env sh
if [ "$(context.task.retry-count)" == "$(params.pipelineTask-retries)" ]; then
Expand Down
14 changes: 7 additions & 7 deletions examples/v1/pipelineruns/ignore-step-error.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ spec:
- name: CONTINUE
steps:
# not really doing anything here, just a hurdle to test the "ignore step error"
- image: docker.io/library/alpine
- image: docker.io/library/alpine:3.20.1
onError: $(params.CONTINUE)
name: exit-with-1
script: |
exit 1
# initialize a task result which will be validated by the next task
- image: docker.io/library/alpine
- image: docker.io/library/alpine:3.20.1
name: write-a-result
onError: continue
script: |
Expand All @@ -46,13 +46,13 @@ spec:
- name: task1-result
steps:
# again, not really doing anything here, just a hurdle to test the "ignore step error"
- image: docker.io/library/alpine
- image: docker.io/library/alpine:3.20.1
onError: continue
name: exit-with-255
script: |
exit 255
# verify that the task result was produced by the first task, fail if the result does not match
- image: docker.io/library/alpine
- image: docker.io/library/alpine:3.20.1
name: verify-a-task-result
script: |
if [ $(params.task1-result) == 123 ]; then
Expand All @@ -62,7 +62,7 @@ spec:
exit 1
fi
# the last step of a task and one more hurdle
- image: docker.io/library/alpine
- image: docker.io/library/alpine:3.20.1
name: exit-with-20
onError: continue
script: |
Expand All @@ -89,7 +89,7 @@ spec:
taskSpec:
steps:
- name: write
image: docker.io/library/alpine
image: docker.io/library/alpine:3.20.1
onError: continue
script: |
ls -1 /tekton/run/
Expand All @@ -106,7 +106,7 @@ spec:
taskSpec:
steps:
- name: read
image: docker.io/library/alpine
image: docker.io/library/alpine:3.20.1
onError: continue
script: |
cat $(workspaces.myws.path)/foo | grep bar
Expand Down
Loading

0 comments on commit 38f2cb5

Please sign in to comment.