Skip to content

Commit a8a7001

Browse files
committed
feat(ISV-6696): Hosted pipeline uses pending index repositories (#921)
In hosted pipeline, switched to using pending repositories instead of public repository mirrors as source for index images.
1 parent 6be33f2 commit a8a7001

4 files changed

Lines changed: 14 additions & 36 deletions

File tree

ansible/roles/operator-pipeline/templates/openshift/pipelines/operator-hosted-pipeline.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -852,7 +852,7 @@ spec:
852852
- name: pipeline_image
853853
value: "$(params.pipeline_image)"
854854
- name: index_images
855-
value: "$(tasks.get-supported-versions.results.public_repository_mirrors_with_version)"
855+
value: "$(tasks.get-supported-versions.results.pending_repositories_with_version)"
856856
- name: commit_sha
857857
value: "$(params.git_commit)"
858858
- name: catalogs_with_added_or_modified_operators
@@ -891,7 +891,7 @@ spec:
891891
- name: pipeline_image
892892
value: "$(params.pipeline_image)"
893893
- name: index_images
894-
value: "$(tasks.get-supported-versions.results.max_supported_public_repository_mirror)"
894+
value: "$(tasks.get-supported-versions.results.max_supported_pending_repository)"
895895
- name: bundle_pullspec
896896
value: *bundleImage
897897
- name: environment

ansible/roles/operator-pipeline/templates/openshift/tasks/add-bundle-to-index.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -71,18 +71,6 @@ spec:
7171
7272
ENV=$(params.environment)
7373
INDEX_IMAGES="$(params.index_images)"
74-
if [[ $ENV != "prod" ]]; then
75-
# Replace registry urls with stage urls when in preprod
76-
INDEX_IMAGES=${INDEX_IMAGES//registry.redhat.io/registry.stage.redhat.io}
77-
fi
78-
79-
if [[ $ENV == "dev" || $ENV == "qa" ]]; then
80-
echo "Adding bundle to an index is a NOOP for dev and qa environments at this time."
81-
echo -n "success" | tee "$(results.status.path)"
82-
# output dummy/test values for following tasks
83-
echo -n "placeholder" | tee "$(workspaces.output.path)/index-image-paths.txt"
84-
exit 0
85-
fi
8674
8775
EXTRA_ARGS=""
8876
if [[ "$(workspaces.credentials.bound)" == "true" ]]; then

ansible/roles/operator-pipeline/templates/openshift/tasks/build-fbc-index-images.yml

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -75,17 +75,6 @@ spec:
7575
7676
ENV=$(params.environment)
7777
INDEX_IMAGES="$(params.index_images)"
78-
if [[ $ENV != "prod" ]]; then
79-
# Replace registry urls with stage urls when in preprod
80-
INDEX_IMAGES=${INDEX_IMAGES//registry.redhat.io/registry.stage.redhat.io}
81-
fi
82-
83-
if [[ $ENV == "dev" || $ENV == "qa" ]]; then
84-
echo "Adding FBC fragment to an index is a NOOP for dev and qa environments at this time."
85-
# output dummy/test values for following tasks
86-
echo -n "placeholder" | tee "$(workspaces.output.path)/index-image-paths.txt"
87-
exit 0
88-
fi
8978
9079
add-fbc-fragments-to-index \
9180
--iib-url "$(params.iib_url)" \
@@ -119,17 +108,6 @@ spec:
119108
120109
ENV=$(params.environment)
121110
INDEX_IMAGES="$(params.index_images)"
122-
if [[ $ENV != "prod" ]]; then
123-
# Replace registry urls with stage urls when in preprod
124-
INDEX_IMAGES=${INDEX_IMAGES//registry.redhat.io/registry.stage.redhat.io}
125-
fi
126-
127-
if [[ $ENV == "dev" || $ENV == "qa" ]]; then
128-
echo "Adding FBC fragment to an index is a NOOP for dev and qa environments at this time."
129-
# output dummy/test values for following tasks
130-
echo -n "placeholder" | tee "$(workspaces.output.path)/index-image-paths.txt"
131-
exit 0
132-
fi
133111
134112
rm-operator-from-index \
135113
--iib-url "$(params.iib_url)" \

ansible/roles/operator-pipeline/templates/openshift/tasks/get-supported-versions.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ spec:
1919
Pull spec for the public repository mirror index image corresponding to the max OCP version.
2020
Example: registry.redhat.io/redhat/community-operator-index:v4.15
2121
22+
- name: max_supported_pending_repository
23+
description: >-
24+
Pull spec for the pending repository index image corresponding to the max OCP version.
25+
Example: quay.io/redhat/redhat----community-operator-index-pending:v4.15
26+
2227
- name: public_repository_mirror
2328
description: >-
2429
Pull spec for the public repository mirror index image.
@@ -103,6 +108,13 @@ spec:
103108
| tee $(results.max_supported_public_repository_mirror.path)
104109
echo
105110
111+
echo "Max supported pending repository pull spec:"
112+
echo $VERSION_INFO \
113+
| jq -r '.max_version_index.pending_repository_with_version' \
114+
| tr -d '\n\r' \
115+
| tee $(results.max_supported_pending_repository.path)
116+
echo
117+
106118
echo "Public repository mirror pull specs with version:"
107119
echo $VERSION_INFO \
108120
| jq -r '.indices[0].public_repository_mirror' \

0 commit comments

Comments
 (0)