Skip to content

Commit 3cffa0d

Browse files
Merge pull request #1441 from onmete/revert-dataverse-exporter-image
Revert dataverse exporter image to OLS tenant build
2 parents 16872a9 + fe40deb commit 3cffa0d

4 files changed

Lines changed: 30 additions & 32 deletions

File tree

.tekton/release/bundle-update/pipeline.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,12 @@ spec:
102102
-o jsonpath='{.spec.components}')
103103
echo "Snapshot images: $SNAPSHOT_IMAGES"
104104
cd repo
105+
# back up the bundle element
106+
jq '.[] | select(.name == "lightspeed-operator-bundle")' related_images.json > bundle.json
105107
./hack/snapshot_to_image_list.sh -s "${SNAPSHOT_NAME}" -r stable -o related_images.json
108+
# restore the bundle element
109+
jq 'map(select(.name != "lightspeed-operator-bundle"))' related_images.json > tmp.json && mv tmp.json related_images.json
110+
jq -s '.[0] + [.[1]]' related_images.json bundle.json > tmp.json && mv tmp.json related_images.json
106111
PATH=./bin:$PATH make bundle
107112
workingDir: /workspace
108113
env:

bundle/manifests/lightspeed-operator.clusterserviceversion.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -798,8 +798,8 @@ spec:
798798
- --console-image=registry.redhat.io/openshift-lightspeed/lightspeed-console-plugin-rhel9@sha256:1887c690e4e37dcffe0fd574e003f86bc5e7624720431b587871b990dd75afa6
799799
- --console-image-pf5=registry.redhat.io/openshift-lightspeed/lightspeed-console-plugin-pf5-rhel9@sha256:34e399b8f565217c85f8a01e479c747407013b512d55f91e96cd8f47cc41e4bb
800800
- --postgres-image=registry.redhat.io/rhel9/postgresql-16@sha256:42f385ac3c9b8913426da7c57e70bc6617cd237aaf697c667f6385a8c0b0118b
801-
- --openshift-mcp-server-image=registry.redhat.io/openshift-lightspeed/openshift-mcp-server-rhel9@sha256:a8e9b963dc01a5c4cc5a6900ac0ea4f8b64fed0c0bd0831f9d3c36b3bc1d58b9
802-
- --dataverse-exporter-image=registry.redhat.io/lightspeed-core/dataverse-exporter-rhel9:0.4.1@sha256:c5a58cb0431bb666c8034be7da7e245234f1294bd6388db47cc43bc62f765f7a
801+
- --openshift-mcp-server-image=registry.redhat.io/openshift-lightspeed/openshift-mcp-server-rhel9@sha256:2fb9689f7145f772157cdbba0a26db4a60a3e5f5f82bd8cc356bad2a0f613eea
802+
- --dataverse-exporter-image=registry.redhat.io/lightspeed-core/dataverse-exporter-rhel9:0.4.1
803803
- --ocp-rag-image=registry.redhat.io/openshift-lightspeed/lightspeed-ocp-rag-rhel9@sha256:e0c1f608d50f03188081285df6bd27f032cb9d70209c82103ee9d827f7add208
804804
command:
805805
- /manager
@@ -929,7 +929,7 @@ spec:
929929
- name: openshift-mcp-server
930930
image: registry.redhat.io/openshift-lightspeed/openshift-mcp-server-rhel9@sha256:2fb9689f7145f772157cdbba0a26db4a60a3e5f5f82bd8cc356bad2a0f613eea
931931
- name: lightspeed-to-dataverse-exporter
932-
image: registry.redhat.io/lightspeed-core/dataverse-exporter-rhel9:0.4.1@sha256:c5a58cb0431bb666c8034be7da7e245234f1294bd6388db47cc43bc62f765f7a
932+
image: registry.redhat.io/lightspeed-core/dataverse-exporter-rhel9:0.4.1
933933
- name: lightspeed-ocp-rag
934934
image: registry.redhat.io/openshift-lightspeed/lightspeed-ocp-rag-rhel9@sha256:e0c1f608d50f03188081285df6bd27f032cb9d70209c82103ee9d827f7add208
935935
- name: lightspeed-postgresql

hack/snapshot_to_image_list.sh

Lines changed: 20 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@
33
usage() {
44
echo "Usage: $0 -s <snapshot-ref> -b <bundle-snapshot-ref> -o <output-file> -p"
55
echo " -s snapshot-ref: required, the snapshot's references, example: ols-cq8sl"
6-
echo " -b bundle-snapshot-ref: optional, the ols-bundle snapshot's references, example: ols-bundle-wf8st."
7-
echo " if not specified, it will keep the bundle image and revision from the output file"
8-
echo " -o output-file: optional, the related images list file to update, default is empty (output to stdout)"
9-
echo " -r: optional, use which registry: stable, preview, ci, default is stable"
6+
echo " -b bundle-snapshot-ref: optional, the ols-bundle snapshot's references, example: ols-bundle-wf8st"
7+
echo " -o output-file: optional, the catalog index file to update, default is empty (output to stdout)"
8+
echo " -r: optional, use which registry: stable, preview, ci"
109
echo " -h: Show this help message"
1110
echo "Example: $0 -s ols-cq8sl -b ols-bundle-wf8st -o related_images.json"
1211
}
@@ -18,8 +17,7 @@ fi
1817

1918
SNAPSHOT_REF=""
2019
OUTPUT_FILE=""
21-
DEFAULT_RELATED_IMAGES_FILE="related_images.json"
22-
USE_REGISTRY="stable"
20+
USE_REGISTRY="ci"
2321
KONFLUX_NAMESPACE="crt-nshift-lightspeed-tenant"
2422

2523
while getopts ":s:b:o:r:h" argname; do
@@ -111,21 +109,13 @@ if [ -n "${BUNDLE_SNAPSHOT_REF}" ]; then
111109
fi
112110
fi
113111

114-
# Get the bundle image and revision from the bundle snapshot if specified
112+
cp ${TMP_SNAPSHOT_JSON} snapshot.json
113+
cp ${TMP_BUNDLE_SNAPSHOT_JSON} bundle_snapshot.json
114+
115115
if [ -n "${BUNDLE_SNAPSHOT_REF}" ]; then
116116
BUNDLE_IMAGE=$(${JQ} -r '.spec.components[]| select(.name=="ols-bundle") | .containerImage' "${TMP_BUNDLE_SNAPSHOT_JSON}")
117117
BUNDLE_REVISION=$(${JQ} -r '.spec.components[]| select(.name=="ols-bundle") | .source.git.revision' "${TMP_BUNDLE_SNAPSHOT_JSON}")
118-
else
119-
# Keep the bundle image and revision from the output file if the bundle snapshot is not specified
120-
if [ -f "${OUTPUT_FILE}" ]; then
121-
BUNDLE_IMAGE=$(${JQ} -r '.[]| select(.name=="lightspeed-operator-bundle") | .image' "${OUTPUT_FILE}")
122-
BUNDLE_REVISION=$(${JQ} -r '.[]| select(.name=="lightspeed-operator-bundle") | .revision' "${OUTPUT_FILE}")
123-
elif [ -f "${DEFAULT_RELATED_IMAGES_FILE}" ]; then
124-
BUNDLE_IMAGE=$(${JQ} -r '.[]| select(.name=="lightspeed-operator-bundle") | .image' "${DEFAULT_RELATED_IMAGES_FILE}")
125-
BUNDLE_REVISION=$(${JQ} -r '.[]| select(.name=="lightspeed-operator-bundle") | .revision' "${DEFAULT_RELATED_IMAGES_FILE}")
126-
fi
127118
fi
128-
129119
OPERATOR_IMAGE=$(${JQ} -r '.spec.components[]| select(.name=="lightspeed-operator") | .containerImage' "${TMP_SNAPSHOT_JSON}")
130120
OPERATOR_REVISION=$(${JQ} -r '.spec.components[]| select(.name=="lightspeed-operator") | .source.git.revision' "${TMP_SNAPSHOT_JSON}")
131121
CONSOLE_IMAGE=$(${JQ} -r '.spec.components[]| select(.name=="lightspeed-console") | .containerImage' "${TMP_SNAPSHOT_JSON}")
@@ -136,6 +126,8 @@ SERVICE_IMAGE=$(${JQ} -r '.spec.components[]| select(.name=="lightspeed-service"
136126
SERVICE_REVISION=$(${JQ} -r '.spec.components[]| select(.name=="lightspeed-service") | .source.git.revision' "${TMP_SNAPSHOT_JSON}")
137127
OPENSHIFT_MCP_SERVER_IMAGE=$(${JQ} -r '.spec.components[]| select(.name=="openshift-mcp-server") | .containerImage' "${TMP_SNAPSHOT_JSON}")
138128
OPENSHIFT_MCP_SERVER_REVISION=$(${JQ} -r '.spec.components[]| select(.name=="openshift-mcp-server") | .source.git.revision' "${TMP_SNAPSHOT_JSON}")
129+
DATAVERSE_EXPORTER_IMAGE=$(${JQ} -r '.spec.components[]| select(.name=="lightspeed-to-dataverse-exporter") | .containerImage' "${TMP_SNAPSHOT_JSON}")
130+
DATAVERSE_EXPORTER_REVISION=$(${JQ} -r '.spec.components[]| select(.name=="lightspeed-to-dataverse-exporter") | .source.git.revision' "${TMP_SNAPSHOT_JSON}")
139131
OCP_RAG_IMAGE=$(${JQ} -r '.spec.components[]| select(.name=="lightspeed-ocp-rag") | .containerImage' "${TMP_SNAPSHOT_JSON}")
140132
OCP_RAG_REVISION=$(${JQ} -r '.spec.components[]| select(.name=="lightspeed-ocp-rag") | .source.git.revision' "${TMP_SNAPSHOT_JSON}")
141133
if [ "${USE_REGISTRY}" = "preview" ]; then
@@ -144,14 +136,16 @@ if [ "${USE_REGISTRY}" = "preview" ]; then
144136
CONSOLE_IMAGE_BASE_PF5="registry.redhat.io/openshift-lightspeed-tech-preview/lightspeed-console-plugin-pf5-rhel9"
145137
SERVICE_IMAGE_BASE="registry.redhat.io/openshift-lightspeed-tech-preview/lightspeed-service-api-rhel9"
146138
OPENSHIFT_MCP_SERVER_IMAGE_BASE="registry.redhat.io/openshift-lightspeed-tech-preview/openshift-mcp-server-rhel9"
139+
DATAVERSE_EXPORTER_IMAGE_BASE="registry.redhat.io/openshift-lightspeed-tech-preview/lightspeed-to-dataverse-exporter-rhel9"
147140
OCP_RAG_IMAGE_BASE="registry.redhat.io/openshift-lightspeed-tech-preview/lightspeed-ocp-rag-rhel9"
148141

149142
OPERATOR_IMAGE=$(sed 's|quay\.io/redhat-user-workloads/crt-nshift-lightspeed-tenant/ols/lightspeed-operator|'"${OPERATOR_IMAGE_BASE}"'|g' <<<${OPERATOR_IMAGE})
150143
CONSOLE_IMAGE=$(sed 's|quay\.io/redhat-user-workloads/crt-nshift-lightspeed-tenant/ols/lightspeed-console|'"${CONSOLE_IMAGE_BASE}"'|g' <<<${CONSOLE_IMAGE})
151144
CONSOLE_IMAGE_PF5=$(sed 's|quay\.io/redhat-user-workloads/crt-nshift-lightspeed-tenant/lightspeed-console-pf5|'"${CONSOLE_IMAGE_BASE_PF5}"'|g' <<<${CONSOLE_IMAGE_PF5})
152145
SERVICE_IMAGE=$(sed 's|quay\.io/redhat-user-workloads/crt-nshift-lightspeed-tenant/ols/lightspeed-service|'"${SERVICE_IMAGE_BASE}"'|g' <<<${SERVICE_IMAGE})
153146
OPENSHIFT_MCP_SERVER_IMAGE=$(sed 's|quay\.io/redhat-user-workloads/crt-nshift-lightspeed-tenant/openshift-mcp-server|'"${OPENSHIFT_MCP_SERVER_IMAGE_BASE}"'|g' <<<${OPENSHIFT_MCP_SERVER_IMAGE})
154-
OCP_RAG_IMAGE=$(sed 's|quay\.io/redhat-user-workloads/crt-nshift-lightspeed-tenant/lightspeed-ocp-rag|'"${OCP_RAG_IMAGE_BASE}"'|g' <<<${OCP_RAG_EXPORTER_IMAGE})
147+
DATAVERSE_EXPORTER_IMAGE=$(sed 's|quay\.io/redhat-user-workloads/crt-nshift-lightspeed-tenant/lightspeed-to-dataverse-exporter|'"${DATAVERSE_EXPORTER_IMAGE_BASE}"'|g' <<<${DATAVERSE_EXPORTER_IMAGE})
148+
OCP_RAG_IMAGE=$(sed 's|quay\.io/redhat-user-workloads/crt-nshift-lightspeed-tenant/lightspeed-ocp-rag|'"${OCP_RAG_IMAGE_BASE}"'|g' <<<${OCP_RAG_EXPORTER_IMAGE})
155149
POSTGRES_IMAGE=$(sed "s|quay\.io.*/lightspeed-postgresql|registry.redhat.io/rhel9/postgresql-16|g" <<<"${POSTGRES_IMAGE}")
156150

157151
if [ -n "${BUNDLE_SNAPSHOT_REF}" ]; then
@@ -166,14 +160,16 @@ if [ "${USE_REGISTRY}" = "stable" ]; then
166160
SERVICE_IMAGE_BASE="registry.redhat.io/openshift-lightspeed/lightspeed-service-api-rhel9"
167161
CONSOLE_IMAGE_BASE_PF5="registry.redhat.io/openshift-lightspeed/lightspeed-console-plugin-pf5-rhel9"
168162
OPENSHIFT_MCP_SERVER_IMAGE_BASE="registry.redhat.io/openshift-lightspeed/openshift-mcp-server-rhel9"
163+
DATAVERSE_EXPORTER_IMAGE_BASE="registry.redhat.io/openshift-lightspeed/lightspeed-to-dataverse-exporter-rhel9"
169164
OCP_RAG_IMAGE_BASE="registry.redhat.io/openshift-lightspeed/lightspeed-ocp-rag-rhel9"
170165

171166
OPERATOR_IMAGE=$(sed 's|quay\.io/redhat-user-workloads/crt-nshift-lightspeed-tenant/ols/lightspeed-operator|'"${OPERATOR_IMAGE_BASE}"'|g' <<<${OPERATOR_IMAGE})
172167
CONSOLE_IMAGE=$(sed 's|quay\.io/redhat-user-workloads/crt-nshift-lightspeed-tenant/ols/lightspeed-console|'"${CONSOLE_IMAGE_BASE}"'|g' <<<${CONSOLE_IMAGE})
173168
SERVICE_IMAGE=$(sed 's|quay\.io/redhat-user-workloads/crt-nshift-lightspeed-tenant/ols/lightspeed-service|'"${SERVICE_IMAGE_BASE}"'|g' <<<${SERVICE_IMAGE})
174169
CONSOLE_IMAGE_PF5=$(sed 's|quay\.io/redhat-user-workloads/crt-nshift-lightspeed-tenant/lightspeed-console-pf5|'"${CONSOLE_IMAGE_BASE_PF5}"'|g' <<<${CONSOLE_IMAGE_PF5})
175170
OPENSHIFT_MCP_SERVER_IMAGE=$(sed 's|quay\.io/redhat-user-workloads/crt-nshift-lightspeed-tenant/openshift-mcp-server|'"${OPENSHIFT_MCP_SERVER_IMAGE_BASE}"'|g' <<<${OPENSHIFT_MCP_SERVER_IMAGE})
176-
OCP_RAG_IMAGE=$(sed 's|quay\.io/redhat-user-workloads/crt-nshift-lightspeed-tenant/lightspeed-ocp-rag|'"${OCP_RAG_IMAGE_BASE}"'|g' <<<${OCP_RAG_IMAGE})
171+
DATAVERSE_EXPORTER_IMAGE=$(sed 's|quay\.io/redhat-user-workloads/crt-nshift-lightspeed-tenant/lightspeed-to-dataverse-exporter|'"${DATAVERSE_EXPORTER_IMAGE_BASE}"'|g' <<<${DATAVERSE_EXPORTER_IMAGE})
172+
OCP_RAG_IMAGE=$(sed 's|quay\.io/redhat-user-workloads/crt-nshift-lightspeed-tenant/lightspeed-ocp-rag|'"${OCP_RAG_IMAGE_BASE}"'|g' <<<${OCP_RAG_IMAGE})
177173
POSTGRES_IMAGE=$(sed "s|quay\.io.*/lightspeed-postgresql|registry.redhat.io/rhel9/postgresql-16|g" <<<"${POSTGRES_IMAGE}")
178174

179175
if [ -n "${BUNDLE_SNAPSHOT_REF}" ]; then
@@ -185,17 +181,12 @@ fi
185181
if [ -z "${POSTGRES_IMAGE}" ] || [ "${POSTGRES_IMAGE}" == "null" ]; then
186182
if [ -f "${OUTPUT_FILE}" ]; then
187183
POSTGRES_IMAGE=$(jq -r '.[] | select(.name == "lightspeed-postgresql") | .image' "${OUTPUT_FILE}")
188-
elif [ -f "${DEFAULT_RELATED_IMAGES_FILE}" ]; then
189-
POSTGRES_IMAGE=$(jq -r '.[] | select(.name == "lightspeed-postgresql") | .image' "${DEFAULT_RELATED_IMAGES_FILE}")
190184
fi
191185
fi
192186

193-
if [ -z "${DATAVERSE_EXPORTER_IMAGE}" ] || [ "${DATAVERSE_EXPORTER_IMAGE}" == "null" ]; then
194-
if [ -f "${OUTPUT_FILE}" ]; then
195-
DATAVERSE_EXPORTER_IMAGE=$(jq -r '.[] | select(.name == "lightspeed-to-dataverse-exporter") | .image' "${OUTPUT_FILE}")
196-
elif [ -f "${DEFAULT_RELATED_IMAGES_FILE}" ]; then
197-
DATAVERSE_EXPORTER_IMAGE=$(jq -r '.[] | select(.name == "lightspeed-to-dataverse-exporter") | .image' "${DEFAULT_RELATED_IMAGES_FILE}")
198-
fi
187+
if [ -z "${POSTGRES_IMAGE}" ] || [ "${POSTGRES_IMAGE}" == "null" ]; then
188+
DEFAULT_POSTGRES_IMAGE=$(grep -o 'PostgresServerImageDefault = "registry[^"]*"' "${SCRIPT_DIR}/../internal/controller/utils/constants.go" | sed 's/PostgresServerImageDefault = "\(.*\)"/\1/')
189+
POSTGRES_IMAGE="${DEFAULT_POSTGRES_IMAGE}"
199190
fi
200191

201192
RELATED_IMAGES=$(
@@ -228,7 +219,8 @@ RELATED_IMAGES=$(
228219
},
229220
{
230221
"name": "lightspeed-to-dataverse-exporter",
231-
"image": "${DATAVERSE_EXPORTER_IMAGE}"
222+
"image": "${DATAVERSE_EXPORTER_IMAGE}",
223+
"revision": "${DATAVERSE_EXPORTER_REVISION}"
232224
},
233225
{
234226
"name": "lightspeed-ocp-rag",

related_images.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
},
2727
{
2828
"name": "lightspeed-to-dataverse-exporter",
29-
"image": "registry.redhat.io/lightspeed-core/dataverse-exporter-rhel9:0.4.1@sha256:c5a58cb0431bb666c8034be7da7e245234f1294bd6388db47cc43bc62f765f7a"
29+
"image": "registry.redhat.io/openshift-lightspeed/lightspeed-to-dataverse-exporter-rhel9@sha256:ec8162a742e6c306c35790f45db23be9b9d12f86ea7555be671ae30832efa04f",
30+
"revision": "dd6fd25963907712fcb429a993d43279aa2583fe"
3031
},
3132
{
3233
"name": "lightspeed-ocp-rag",

0 commit comments

Comments
 (0)