Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .tekton/multiarch-pull-request-pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ spec:
set of values is determined by the configuration of the multi-platform-controller.
name: build-platforms
type: array
- default: []
description: Array of image labels to apply to the image (key=value strings)
name: image-labels
type: array
results:
- description: ""
name: IMAGE_URL
Expand Down Expand Up @@ -219,6 +223,9 @@ spec:
value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT)
- name: IMAGE_APPEND_PLATFORM
value: "true"
- name: IMAGE_LABELS
value:
- $(params.image-labels[*])
runAfter:
- prefetch-dependencies
taskRef:
Expand Down
7 changes: 7 additions & 0 deletions .tekton/multiarch-push-pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ spec:
description: Whether to enable privileged mode, should be used only with remote VMs
name: privileged-nested
type: string
- default: []
description: Array of image labels to apply to the built image.
name: image-labels
type: array
- default:
- linux/x86_64
description: List of platforms to build the container images on. The available
Expand Down Expand Up @@ -275,6 +279,9 @@ spec:
value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT)
- name: IMAGE_APPEND_PLATFORM
value: "true"
- name: IMAGE_LABELS
value:
- $(params.image-labels[*])
runAfter:
- prefetch-dependencies
taskRef:
Expand Down
3 changes: 3 additions & 0 deletions .tekton/odh-base-image-cuda-py311-c9s-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ spec:
value: base-images/cuda/12.6/c9s-python-3.11/Dockerfile.cuda
- name: path-context
value: .
- name: image-labels
value:
- release=2025b
pipelineRef:
name: multiarch-pull-request-pipeline
taskRunTemplate:
Expand Down
3 changes: 3 additions & 0 deletions .tekton/odh-base-image-cuda-py311-c9s-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ spec:
value:
- linux/x86_64
- linux/arm64
- name: image-labels
value:
- release=2025b
- name: path-context
value: .
- name: additional-tags
Expand Down
3 changes: 3 additions & 0 deletions .tekton/odh-base-image-cuda-py312-c9s-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ spec:
value: base-images/cuda/12.6/c9s-python-3.12/Dockerfile.cuda
- name: path-context
value: .
- name: image-labels
value:
- release=2025b
pipelineRef:
name: multiarch-pull-request-pipeline
taskRunTemplate:
Expand Down
3 changes: 3 additions & 0 deletions .tekton/odh-base-image-cuda-py312-c9s-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ spec:
value:
- '{{target_branch}}-{{revision}}'
- v12.6
- name: image-labels
value:
- release=2025b
pipelineRef:
name: multiarch-push-pipeline
taskRunTemplate:
Expand Down
3 changes: 3 additions & 0 deletions .tekton/odh-base-image-cuda-py312-ubi9-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ spec:
value: base-images/cuda/12.6/ubi9-python-3.12/Dockerfile.cuda
- name: path-context
value: .
- name: image-labels
value:
- release=2025b
pipelineRef:
name: multiarch-pull-request-pipeline
taskRunTemplate:
Expand Down
3 changes: 3 additions & 0 deletions .tekton/odh-base-image-cuda-py312-ubi9-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ spec:
value:
- '{{target_branch}}-{{revision}}'
- v12.6
- name: image-labels
value:
- release=2025b
pipelineRef:
name: multiarch-push-pipeline
taskRunTemplate:
Expand Down
3 changes: 3 additions & 0 deletions .tekton/odh-base-image-rocm-py312-c9s-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ spec:
value: base-images/rocm/6.2/c9s-python-3.12/Dockerfile.rocm
- name: path-context
value: .
- name: image-labels
value:
- release=2025b
Comment on lines +43 to +45
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Confirm pipeline param exists and is wired to labeling step; update the generator instead of hand-editing autogen files.

This file is autogenerated; edit scripts/generate_pull_request_pipelineruns.py (and any related generators) so the change persists. Also verify that multiarch-pull-request-pipeline declares a param named image-labels (type: array) and passes it to the image build/task that applies labels; otherwise this addition will be ignored at runtime.

Run:


🏁 Script executed:

#!/bin/bash
# 1) Confirm the pipeline defines the param
rg -nC3 -g '!**/vendor/**' -P '(?s)\bkind:\s*Pipeline\b.*?\bmetadata:\s*\n.*?\bname:\s*multiarch-pull-request-pipeline\b.*?\bspec:\s*\n.*?\bparams:\s*\n.*?(?:-.*\n)*?\bname:\s*image-labels\b' .tekton

# 2) Check any task/step uses it (e.g., $(params.image-labels))
rg -n --pcre2 '\$\(\s*params\.image-labels\s*\)' .tekton

# 3) Ensure all autogenerated PR PipelineRuns gained the param
rg -n 'on-pull-request' .tekton | wc -l
rg -n 'name:\s*image-labels' .tekton | wc -l

Length of output: 353


Add image-labels to the multiarch-pull-request-pipeline spec.params, wire it into the image-build task, and update the generator
No image-labels param is defined in the pipeline YAML and no steps reference $(params.image-labels)—edit scripts/generate_pull_request_pipelineruns.py so autogenerated PipelineRuns include the array param and pass it to the build/task that applies labels.

🤖 Prompt for AI Agents
.tekton/odh-base-image-rocm-py312-c9s-pull-request.yaml lines 43-45: the
PipelineRun/pipeline spec is missing an "image-labels" param and the image-build
task isn't receiving any labels; update the pipeline YAML to declare a param
named image-labels of type array (with appropriate default or allow empty), and
modify the image-build/taskref/taskSpec step(s) invocation to pass labels via
"$(params.image-labels)". Then edit
scripts/generate_pull_request_pipelineruns.py so autogenerated PipelineRun
objects include the image-labels array param in the params list and forward that
param value into the task invocation for the build/label step when rendering
PipelineRuns.

pipelineRef:
name: multiarch-pull-request-pipeline
taskRunTemplate:
Expand Down
3 changes: 3 additions & 0 deletions .tekton/odh-base-image-rocm-py312-c9s-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ spec:
value:
- '{{target_branch}}-{{revision}}'
- v6.2
- name: image-labels
value:
- release=2025b
Comment on lines +34 to +36
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Ensure singlearch-push-pipeline supports image-labels (array) and passes it to the builder

Push runs will fail early if the Pipeline lacks the param, even if other params are valid.

Re-run the repo-wide script from the first file to confirm param declaration and usage.


🏁 Script executed:

#!/bin/bash
set -e
# Locate the singlearch-push-pipeline definition file
PIPELINE_FILE=$(rg -lP --max-count=1 'name:\s*singlearch-push-pipeline\b' -g '*.yaml' .tekton)
echo "Pipeline file: $PIPELINE_FILE"
# Print its params block
echo -e "\n=== params in $PIPELINE_FILE ==="
sed -n '/params:/,/^[[:space:]]*[^- ]/p' "$PIPELINE_FILE"
# Look for any references to image-labels in the pipeline
echo -e "\n=== Occurrences of image-labels in $PIPELINE_FILE ==="
grep -R -n 'image-labels' "$PIPELINE_FILE"

Length of output: 10470


🏁 Script executed:

#!/bin/bash
set -e
FILE=".tekton/singlearch-push-pipeline.yaml"
echo "=== Showing first 200 lines of $FILE ==="
head -n 200 "$FILE"
echo
echo "=== Listing all params declared in $FILE ==="
grep -n '^\s*-\s*name:' "$FILE"
echo
echo "=== Searching for 'image-labels' in $FILE ==="
grep -n 'image-labels' "$FILE" || echo "No occurrences of 'image-labels' found."

Length of output: 12361


Add and wire image-labels param in singlearch-push-pipeline
In .tekton/singlearch-push-pipeline.yaml, under spec.params add:

- name: image-labels
  type: array
  description: Array of image labels to apply to the built image
  default: []

Then, in the build-container task invocation, append:

- name: IMAGE_LABELS
  value: $(params.image-labels)

This ensures PipelineRuns supplying image-labels (e.g. release tags) won’t error out and that labels are passed through to the builder.

🤖 Prompt for AI Agents
In .tekton/odh-base-image-rocm-py312-c9s-push.yaml lines 34-36, add and wire an
image-labels parameter in .tekton/singlearch-push-pipeline.yaml: under
spec.params add a param named image-labels of type array with description "Array
of image labels to apply to the built image" and default [], and in the
build-container task invocation append the param mapping for IMAGE_LABELS with
value $(params.image-labels) so PipelineRuns can supply labels without errors
and they are forwarded to the builder.

pipelineRef:
name: singlearch-push-pipeline
taskRunTemplate:
Expand Down
3 changes: 3 additions & 0 deletions .tekton/odh-base-image-rocm-py312-ubi9-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ spec:
value: base-images/rocm/6.2/ubi9-python-3.12/Dockerfile.rocm
- name: path-context
value: .
- name: image-labels
value:
- release=2025b
pipelineRef:
name: multiarch-pull-request-pipeline
taskRunTemplate:
Expand Down
3 changes: 3 additions & 0 deletions .tekton/odh-base-image-rocm-py312-ubi9-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ spec:
value:
- '{{target_branch}}-{{revision}}'
- v6.2
- name: image-labels
value:
- release=2025b
Comment on lines +35 to +37
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Validate singlearch-push-pipeline supports image-labels and that the label lands in the built image.

Ensure the pipeline defines image-labels (array) and forwards it to the build step. Consider a post-build verify step (crane or skopeo) to assert the image contains label release=2025b to prevent silent drift.

Run:


🏁 Script executed:

#!/bin/bash
# Pipeline param presence
rg -nC3 -P '(?s)\bkind:\s*Pipeline\b.*?\bmetadata:\s*\n.*?\bname:\s*singlearch-push-pipeline\b.*?\bparams:\s*\n.*?(?:-.*\n)*?\bname:\s*image-labels\b' .tekton

# Wiring to tasks
rg -n --pcre2 '\$\(\s*params\.image-labels\s*\)' .tekton

Length of output: 219


🏁 Script executed:

#!/bin/bash
# Locate pipeline definition files referencing 'singlearch-push-pipeline'
echo "Searching for pipeline files containing 'singlearch-push-pipeline' or 'single-arch-push-pipeline':"
grep -R -n --include='*.yaml' -E 'singlearch-push-pipeline|single-arch-push-pipeline' .tekton || true

# Inspect found file(s) for params and wiring
for file in $(grep -R -l --include='*.yaml' -E 'singlearch-push-pipeline|single-arch-push-pipeline' .tekton); do
  echo -e "\n--- Inspecting $file ---"
  # Show params section
  rg -nC2 --pcre2 '\bparams:\b' "$file" || echo "No 'params:' section found"
  # Search for image-labels in param definitions
  rg -n --pcre2 '\bname:\s*image-labels\b' "$file" || echo "No 'image-labels' param declared"
  # Search for any occurrence of image-labels usage
  rg -n --pcre2 '\$\(\s*params\.(image-labels|imageLabels)\s*\)' "$file" || echo "No wiring of image-labels in tasks"
done

Length of output: 22161


Add and wire image-labels in the singlearch-push-pipeline

  • In .tekton/singlearch-push-pipeline.yaml, declare a parameter:
    params:
    - name: image-labels
      type: array
      default: []
  • Forward it into the build task (e.g. buildah bud or kaniko) as annotations/labels via $(params.image-labels).
  • (Optional) Add a post-build step using crane or skopeo to assert the image contains release=2025b, preventing silent drift.

pipelineRef:
name: singlearch-push-pipeline
taskRunTemplate:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ spec:
value: .
- name: build-args-file
value: runtimes/datascience/ubi9-python-3.12/build-args/cpu.conf
- name: image-labels
value:
- release=2025b
pipelineRef:
name: multiarch-pull-request-pipeline
taskRunTemplate:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ spec:
value: .
- name: build-args-file
value: runtimes/minimal/ubi9-python-3.12/build-args/cpu.conf
- name: image-labels
value:
- release=2025b
pipelineRef:
name: multiarch-pull-request-pipeline
taskRunTemplate:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ spec:
value: .
- name: build-args-file
value: runtimes/pytorch/ubi9-python-3.12/build-args/cuda.conf
- name: image-labels
value:
- release=2025b
pipelineRef:
name: multiarch-pull-request-pipeline
taskRunTemplate:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ spec:
value: .
- name: build-args-file
value: runtimes/pytorch+llmcompressor/ubi9-python-3.12/build-args/cuda.conf
- name: image-labels
value:
- release=2025b
pipelineRef:
name: multiarch-pull-request-pipeline
taskRunTemplate:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ spec:
value: .
- name: build-args-file
value: runtimes/rocm-pytorch/ubi9-python-3.12/build-args/rocm.conf
- name: image-labels
value:
- release=2025b
pipelineRef:
name: multiarch-pull-request-pipeline
taskRunTemplate:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ spec:
value: .
- name: build-args-file
value: runtimes/tensorflow/ubi9-python-3.12/build-args/cuda.conf
- name: image-labels
value:
- release=2025b
pipelineRef:
name: multiarch-pull-request-pipeline
taskRunTemplate:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ spec:
value: .
- name: build-args-file
value: runtimes/rocm-tensorflow/ubi9-python-3.12/build-args/rocm.conf
- name: image-labels
value:
- release=2025b
pipelineRef:
name: multiarch-pull-request-pipeline
taskRunTemplate:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ spec:
value: .
- name: build-args-file
value: codeserver/ubi9-python-3.12/build-args/cpu.conf
- name: image-labels
value:
- release=2025b
pipelineRef:
name: multiarch-pull-request-pipeline
taskRunTemplate:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ spec:
value: .
- name: build-args-file
value: jupyter/datascience/ubi9-python-3.12/build-args/cpu.conf
- name: image-labels
value:
- release=2025b
pipelineRef:
name: multiarch-pull-request-pipeline
taskRunTemplate:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ spec:
value: .
- name: build-args-file
value: jupyter/minimal/ubi9-python-3.12/build-args/cpu.conf
- name: image-labels
value:
- release=2025b
pipelineRef:
name: multiarch-pull-request-pipeline
taskRunTemplate:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ spec:
value: .
- name: build-args-file
value: jupyter/minimal/ubi9-python-3.12/build-args/cuda.conf
- name: image-labels
value:
- release=2025b
pipelineRef:
name: multiarch-pull-request-pipeline
taskRunTemplate:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ spec:
value: .
- name: build-args-file
value: jupyter/minimal/ubi9-python-3.12/build-args/rocm.conf
- name: image-labels
value:
- release=2025b
Comment on lines +45 to +47
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Ensure the target Pipeline declares and uses param image-labels (array).

This PipelineRun passes an array param. Verify that the referenced Pipeline (multiarch-pull-request-pipeline) defines ParamSpec image-labels with type array and that the build task actually applies these labels (e.g., buildah --label). Otherwise, the run will fail with “param not declared” or silently ignore labels.

Run this repo-scoped check:


🏁 Script executed:

#!/bin/bash
set -euo pipefail
# 1) Confirm the pipeline exists and declares the param
rg -nC3 -g ".tekton/**" -e $'^kind:\\s*Pipeline$' -e $'^metadata:\\n\\s*name:\\s*multiarch-pull-request-pipeline$' || true
rg -nC2 -g ".tekton/**" --pretty $'- name:\\s*image-labels\\b' || true
rg -nC2 -g ".tekton/**" --pretty $'type:\\s*array' || true

# 2) Confirm it’s consumed by tasks
rg -nC2 -g ".tekton/**" --pretty '\$\(\s*params\.image-labels' || true

# 3) Ensure all PR/push PipelineRuns have image-labels
echo "Missing image-labels in Tekton PipelineRuns:"
fd -a -e yaml .tekton | xargs -I{} bash -c 'grep -q "kind: PipelineRun" "{}" && (grep -q "name: image-labels" "{}" || echo "{}")'

Length of output: 1464


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

# 1) List all Tekton YAML files to locate pipeline definitions
echo "All Tekton YAML files:"
find .tekton -type f -name '*.yaml'

# 2) Find the multiarch-pull-request-pipeline file(s)
echo
echo "Files containing 'multiarch-pull-request-pipeline':"
grep -R -n "multiarch-pull-request-pipeline" .tekton

# 3) Confirm the pipeline declares the image-labels param with type array
PIPELINE_FILES=$(grep -R -l "multiarch-pull-request-pipeline" .tekton)
for file in $PIPELINE_FILES; do
  echo
  echo "Inspecting $file for params.image-labels:"
  grep -R -n -C2 "params:" "$file"
  grep -R -n "name:\s*image-labels" "$file" || echo "  ⚠️ name: image-labels not found"
  grep -R -n "type:\s*array" "$file" || echo "  ⚠️ type: array not found for image-labels"
done

# 4) Check that tasks within the pipeline reference params.image-labels
for file in $PIPELINE_FILES; do
  echo
  echo "Checking consumption of params.image-labels in $file:"
  grep -R -n "\$\{\s*params.image-labels" "$file" || echo "  ⚠️ params.image-labels not referenced"
done

# 5) Ensure every PipelineRun under .tekton includes the image-labels param
echo
echo "PipelineRun YAMLs missing the image-labels param:"
for pr in $(grep -R -l "kind:\s*PipelineRun" -n .tekton); do
  if ! grep -q -E "name:\s*image-labels" "$pr"; then
    echo "  - $pr"
  fi
done

Length of output: 58837


Add image-labels ParamSpec and consume it in multiarch-pull-request-pipeline.yaml
The pipeline does not declare a params.image-labels of type array (so any PipelineRun passing it will error) and no task uses $(params.image-labels). Add under the top-level params: block:

- name: image-labels
  type: array

Then inject $(params.image-labels) into the build task (e.g. buildah --label) to apply the labels.

🤖 Prompt for AI Agents
In .tekton/odh-workbench-jupyter-minimal-rocm-py312-ubi9-pull-request.yaml
around lines 45-47, the file sets image-labels as a literal value but does not
declare a params.image-labels of type array nor consume it; add a top-level
params entry for image-labels with type: array (e.g. under the existing params:
block add "- name: image-labels\n  type: array") and then update the
pipeline/task invocation that runs the build
(multiarch-pull-request-pipeline.yaml consumer) to pass and consume
$(params.image-labels) into the build step (for example by mapping it to the
buildah --label arguments or the task param that supplies labels) so
PipelineRuns can supply an array of labels and the build command applies them.

pipelineRef:
name: multiarch-pull-request-pipeline
taskRunTemplate:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ spec:
value: .
- name: build-args-file
value: jupyter/pytorch/ubi9-python-3.12/build-args/cuda.conf
- name: image-labels
value:
- release=2025b
pipelineRef:
name: multiarch-pull-request-pipeline
taskRunTemplate:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ spec:
value: .
- name: build-args-file
value: jupyter/pytorch+llmcompressor/ubi9-python-3.12/build-args/cuda.conf
- name: image-labels
value:
- release=2025b
pipelineRef:
name: multiarch-pull-request-pipeline
taskRunTemplate:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ spec:
value: .
- name: build-args-file
value: jupyter/rocm/pytorch/ubi9-python-3.12/build-args/rocm.conf
- name: image-labels
value:
- release=2025b
pipelineRef:
name: multiarch-pull-request-pipeline
taskRunTemplate:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ spec:
value: .
- name: build-args-file
value: jupyter/tensorflow/ubi9-python-3.12/build-args/cuda.conf
- name: image-labels
value:
- release=2025b
pipelineRef:
name: multiarch-pull-request-pipeline
taskRunTemplate:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ spec:
value: .
- name: build-args-file
value: jupyter/rocm/tensorflow/ubi9-python-3.12/build-args/rocm.conf
- name: image-labels
value:
- release=2025b
pipelineRef:
name: multiarch-pull-request-pipeline
taskRunTemplate:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ spec:
value: .
- name: build-args-file
value: jupyter/trustyai/ubi9-python-3.12/build-args/cpu.conf
- name: image-labels
value:
- release=2025b
pipelineRef:
name: multiarch-pull-request-pipeline
taskRunTemplate:
Expand Down
Loading