Skip to content

Commit 7dacde1

Browse files
committed
Tests for podTemplate param substitution on TaskRuns/TaskRunSpecs
1 parent ca4e459 commit 7dacde1

File tree

4 files changed

+1697
-8
lines changed

4 files changed

+1697
-8
lines changed

examples/v1/pipelineruns/pipelinerun-with-taskrunspecs-matrix-param-substitution.yaml renamed to examples/v1/pipelineruns/beta/pipelinerun-with-matrix-and-taskrunspecs-param-substitution.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ spec:
77
- pipelineTaskName: build-and-push-manifest
88
podTemplate:
99
nodeSelector:
10-
kubernetes.io/arch: $(params.arch)
10+
node-type: $(params.node-type)
1111
- pipelineTaskName: create-manifest-list
1212
podTemplate:
1313
nodeSelector:
@@ -17,20 +17,20 @@ spec:
1717
- name: build-and-push-manifest
1818
matrix:
1919
params:
20-
- name: arch
21-
value: ["amd64", "arm64"]
20+
- name: node-type
21+
value: ["worker-1", "worker-2"]
2222
taskSpec:
2323
results:
2424
- name: manifest
2525
type: string
2626
params:
27-
- name: arch
27+
- name: node-type
2828
steps:
2929
- name: build-and-push
3030
image: ubuntu
3131
script: |
32-
echo "building on $(params.arch)"
33-
echo "testmanifest-$(params.arch)" | tee $(results.manifest.path)
32+
echo "building on $(params.node-type)"
33+
echo "testmanifest-$(params.node-type)" | tee $(results.manifest.path)
3434
- name: create-manifest-list
3535
params:
3636
- name: manifest

hack/setup-kind.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,13 +125,17 @@ kind: Cluster
125125
nodes:
126126
- role: control-plane
127127
image: "${KIND_IMAGE}"
128+
labels:
129+
node-type: "control-plane"
128130
EOF
129131

130132
for i in $(seq 1 1 "${NODE_COUNT}");
131133
do
132134
cat >> kind.yaml <<EOF
133135
- role: worker
134136
image: "${KIND_IMAGE}"
137+
labels:
138+
node-type: "worker-${i}"
135139
EOF
136140
done
137141

0 commit comments

Comments
 (0)