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
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,18 @@ images:
to: test-oadp-operator
operator:
bundles:
- dockerfile_path: build/Dockerfile.bundle
- as: oadp-operator-bundle
dockerfile_path: build/Dockerfile.bundle
skip_building_index: true
promotion:
to:
- excluded_images:
- test-oadp-operator
name: oadp-operator
namespace: konveyor
- additional_images:
oadp-operator-bundle: oadp-operator-bundle
oadp-operator-e2e-tests: test-oadp-operator
Comment on lines 19 to 27

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -eu

for f in \
  ci-operator/config/openshift/oadp-operator/openshift-oadp-operator-oadp-1.6.yaml \
  ci-operator/config/openshift/oadp-operator/openshift-oadp-operator-oadp-dev.yaml
do
  echo "===== $f ====="
  sed -n '1,45p' "$f"
done

echo "===== related promotion configurations ====="
rg -n -C 5 'excluded_images:|additional_images:|promotion:' ci-operator/config/openshift/oadp-operator

Repository: openshift/release

Length of output: 9219


🌐 Web query:

OpenShift ci-operator promotion configuration excluded_images additional_images multiple promotion targets semantics

💡 Result:

In OpenShift ci-operator, the promotion configuration defines how container images built from a repository are promoted to external ImageStreams for use in other projects [1][2]. When multiple promotion targets are specified, the configuration allows for granular control over which images are published to each target [3][4]. Core Semantics and Configuration: 1. Multiple Promotion Targets: The promotion.to field accepts a list of targets [3][4]. Each target is defined by a block containing parameters such as namespace, name, or tag [1][2]. This allows a single repository to promote images to multiple destination ImageStreams simultaneously [5]. 2. additional_images: This field is a mapping that allows you to promote intermediary pipeline images (e.g., compiled test binaries or internal scripts) that are not part of the primary component build [1]. It maps the pipeline image tag to the desired name in the destination ImageStream [1]. Note that images specified here are exempt from the excluded_images restriction [1]. 3. excluded_images: This is an array of image names that should be blocked from promotion [1]. This exclusion applies to images built by the repository [1]. 4. Wildcard Support: The * wildcard can be used within the excluded_images list to exclude all images for a specific target [3][4]. This is particularly useful when configuring multiple targets, as it allows you to promote only specific, select images to one destination while promoting others elsewhere [3][5]. Example of Complex Promotion: The following configuration demonstrates promoting specific images to one target and everything else to a different target [3][4]: promotion: to: - namespace: "ci" name: "cli-ocm" excluded_images: - "*" additional_images: latest: cli-ocm - namespace: "origin" name: "4.15" excluded_images: - cli-ocm In this example, the first target only receives the cli-ocm image (via additional_images), while the second target receives all built images except for cli-ocm [3][4]. Promotion only occurs if all configured targets are successful and the --promote flag is used [1].

Citations:


🏁 Script executed:

#!/bin/bash
set -eu

echo "===== ci-operator configuration semantics ====="
curl -fsSL https://raw.githubusercontent.com/openshift/ci-operator/master/CONFIGURATION.md |
  rg -n -C 8 'excluded_images|additional_images|promotion:|promot' | head -n 180

echo "===== repository-wide matching promotion patterns ====="
rg -n -U -C 6 'excluded_images:\n\s+-\s+\S+.*\n\s+name:|additional_images:' ci-operator/config |
  head -n 240

echo "===== local references to the destination images ====="
rg -n -C 5 'oadp-operator-e2e-tests|test-oadp-operator' ci-operator/config/openshift/oadp-operator

Repository: openshift/release

Length of output: 50374


🏁 Script executed:

#!/bin/bash
set -eu

tree="$(curl -fsSL 'https://api.github.com/repos/openshift/ci-operator/git/trees/master?recursive=1')"
printf '%s' "$tree" |
  jq -r '.tree[] | select(.path | test("promot|promotion"; "i")) | .path' |
  head -n 80

echo "===== promotion implementation references ====="
for path in $(printf '%s' "$tree" |
  jq -r '.tree[] | select(.path | test("\\.(go)$")) | .path' |
  head -n 400)
do
  body="$(curl -fsSL "https://raw.githubusercontent.com/openshift/ci-operator/master/$path")"
  if printf '%s' "$body" | rg -q 'ExcludedImages|AdditionalImages|excluded_images|additional_images'; then
    echo "===== $path ====="
    printf '%s\n' "$body" |
      rg -n -C 6 'ExcludedImages|AdditionalImages|excluded_images|additional_images' |
      head -n 160
  fi
done

Repository: openshift/release

Length of output: 206


🏁 Script executed:

#!/bin/bash
set -eu

curl -fsSL 'https://api.github.com/repos/openshift/ci-operator/git/trees/master?recursive=1' |
  jq -r '.tree[] | select(.path | test("promot|promotion"; "i")) | .path'

Repository: openshift/release

Length of output: 204


Exclude test-oadp-operator from both promotion targets.

Add excluded_images: [test-oadp-operator] to the oadp-1.6 and oadp-dev tag targets. Keep the additional_images mapping because exclusions do not affect explicitly mapped images.

📍 Affects 2 files
  • ci-operator/config/openshift/oadp-operator/openshift-oadp-operator-oadp-1.6.yaml#L19-L27 (this comment)
  • ci-operator/config/openshift/oadp-operator/openshift-oadp-operator-oadp-dev.yaml#L19-L27
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@ci-operator/config/openshift/oadp-operator/openshift-oadp-operator-oadp-1.6.yaml`
around lines 19 - 27, Exclude test-oadp-operator from both promotion targets by
adding excluded_images to the oadp-1.6 target in
ci-operator/config/openshift/oadp-operator/openshift-oadp-operator-oadp-1.6.yaml:19-27
and the oadp-dev target in
ci-operator/config/openshift/oadp-operator/openshift-oadp-operator-oadp-dev.yaml:19-27;
retain each target’s existing additional_images mapping.

Source: MCP tools

oadp-operator-index: ci-index
namespace: konveyor
tag: oadp-1.6
resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,18 @@ images:
to: test-oadp-operator
operator:
bundles:
- dockerfile_path: build/Dockerfile.bundle
- as: oadp-operator-bundle
dockerfile_path: build/Dockerfile.bundle
skip_building_index: true
promotion:
to:
- excluded_images:
- test-oadp-operator
name: oadp-operator
namespace: konveyor
- additional_images:
oadp-operator-bundle: oadp-operator-bundle
oadp-operator-e2e-tests: test-oadp-operator
oadp-operator-index: ci-index
namespace: konveyor
tag: oadp-dev
resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ postsubmits:
- --promote
- --report-credentials-file=/etc/report/credentials
- --target=[images]
- --target=ci-index
- --target=oadp-operator-bundle
- --target=test-oadp-operator
command:
- ci-operator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1894,7 +1894,7 @@ presubmits:
- ^oadp-1\.6$
- ^oadp-1\.6-
cluster: build01
context: ci/prow/ci-index
context: ci/prow/ci-bundle-oadp-operator-bundle
decorate: true
decoration_config:
sparse_checkout_files:
Expand All @@ -1903,15 +1903,15 @@ presubmits:
labels:
ci.openshift.io/generator: prowgen
pj-rehearse.openshift.io/can-be-rehearsed: "true"
name: pull-ci-openshift-oadp-operator-oadp-1.6-ci-index
rerun_command: /test ci-index
name: pull-ci-openshift-oadp-operator-oadp-1.6-ci-bundle-oadp-operator-bundle
rerun_command: /test ci-bundle-oadp-operator-bundle
spec:
containers:
- args:
- --gcs-upload-secret=/secrets/gcs/service-account.json
- --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson
- --report-credentials-file=/etc/report/credentials
- --target=ci-index
- --target=oadp-operator-bundle
command:
- ci-operator
image: quay-proxy.ci.openshift.org/openshift/ci:ci_ci-operator_latest
Expand Down Expand Up @@ -1944,7 +1944,7 @@ presubmits:
- name: result-aggregator
secret:
secretName: result-aggregator
trigger: (?m)^/test( | .* )ci-index,?($|\s.*)
trigger: (?m)^/test( | .* )ci-bundle-oadp-operator-bundle,?($|\s.*)
- agent: kubernetes
always_run: true
branches:
Expand All @@ -1970,7 +1970,7 @@ presubmits:
- --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson
- --report-credentials-file=/etc/report/credentials
- --target=[images]
- --target=ci-index
- --target=oadp-operator-bundle
- --target=test-oadp-operator
command:
- ci-operator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ postsubmits:
- --promote
- --report-credentials-file=/etc/report/credentials
- --target=[images]
- --target=ci-index
- --target=oadp-operator-bundle
- --target=test-oadp-operator
command:
- ci-operator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1369,7 +1369,7 @@ presubmits:
- ^oadp-dev$
- ^oadp-dev-
cluster: build05
context: ci/prow/ci-index
context: ci/prow/ci-bundle-oadp-operator-bundle
decorate: true
decoration_config:
sparse_checkout_files:
Expand All @@ -1378,15 +1378,15 @@ presubmits:
labels:
ci.openshift.io/generator: prowgen
pj-rehearse.openshift.io/can-be-rehearsed: "true"
name: pull-ci-openshift-oadp-operator-oadp-dev-ci-index
rerun_command: /test ci-index
name: pull-ci-openshift-oadp-operator-oadp-dev-ci-bundle-oadp-operator-bundle
rerun_command: /test ci-bundle-oadp-operator-bundle
spec:
containers:
- args:
- --gcs-upload-secret=/secrets/gcs/service-account.json
- --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson
- --report-credentials-file=/etc/report/credentials
- --target=ci-index
- --target=oadp-operator-bundle
command:
- ci-operator
image: quay-proxy.ci.openshift.org/openshift/ci:ci_ci-operator_latest
Expand Down Expand Up @@ -1419,7 +1419,7 @@ presubmits:
- name: result-aggregator
secret:
secretName: result-aggregator
trigger: (?m)^/test( | .* )ci-index,?($|\s.*)
trigger: (?m)^/test( | .* )ci-bundle-oadp-operator-bundle,?($|\s.*)
- agent: kubernetes
always_run: true
branches:
Expand All @@ -1445,7 +1445,7 @@ presubmits:
- --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson
- --report-credentials-file=/etc/report/credentials
- --target=[images]
- --target=ci-index
- --target=oadp-operator-bundle
- --target=test-oadp-operator
command:
- ci-operator
Expand Down