File tree 3 files changed +18
-3
lines changed
ci-operator/step-registry
3 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -268,7 +268,12 @@ if [ ${Z_VERSION} -gt 9 ]; then
268
268
fi
269
269
if [ -f ${PULL_THROUGH_CACHE_CONFIG} ]; then
270
270
echo " $( date -u --rfc-3339=seconds) - pull-through cache configuration found. updating install-config"
271
- cat ${PULL_THROUGH_CACHE_CONFIG} >> ${CONFIG}
271
+ if [ " ${Z_VERSION} " -lt 14 ]; then
272
+ echo " $( date -u --rfc-3339=seconds) - detected OCP version < 4.14. converting imageDigestSources to imageContentSources for backwards compatability."
273
+ cat ${PULL_THROUGH_CACHE_CONFIG} | sed ' s/imageDigestSources/imageContentSources/g' >> ${CONFIG}
274
+ else
275
+ cat ${PULL_THROUGH_CACHE_CONFIG} >> ${CONFIG}
276
+ fi
272
277
else
273
278
echo " $( date -u --rfc-3339=seconds) - pull-through cache configuration not found. not updating install-config"
274
279
fi
Original file line number Diff line number Diff line change @@ -252,7 +252,12 @@ if [ ${Z_VERSION} -gt 9 ]; then
252
252
fi
253
253
if [ -f ${PULL_THROUGH_CACHE_CONFIG} ]; then
254
254
echo " $( date -u --rfc-3339=seconds) - pull-through cache configuration found. updating install-config"
255
- cat ${PULL_THROUGH_CACHE_CONFIG} >> ${CONFIG}
255
+ if [ " ${Z_VERSION} " -lt 14 ]; then
256
+ echo " $( date -u --rfc-3339=seconds) - detected OCP version < 4.14. converting imageDigestSources to imageContentSources for backwards compatability."
257
+ cat ${PULL_THROUGH_CACHE_CONFIG} | sed ' s/imageDigestSources/imageContentSources/g' >> ${CONFIG}
258
+ else
259
+ cat ${PULL_THROUGH_CACHE_CONFIG} >> ${CONFIG}
260
+ fi
256
261
else
257
262
echo " $( date -u --rfc-3339=seconds) - pull-through cache configuration not found. not updating install-config"
258
263
fi
Original file line number Diff line number Diff line change @@ -400,7 +400,12 @@ if [ ${CACHE_FORCE_DISABLE} == "false" ]; then
400
400
fi
401
401
if [ -f ${PULL_THROUGH_CACHE_CONFIG} ]; then
402
402
echo " $( date -u --rfc-3339=seconds) - pull-through cache configuration found. updating install-config"
403
- cat ${PULL_THROUGH_CACHE_CONFIG} >> ${install_config}
403
+ if [ " ${Z_VERSION} " -lt 14 ]; then
404
+ echo " $( date -u --rfc-3339=seconds) - detected OCP version < 4.14. converting imageDigestSources to imageContentSources for backwards compatability."
405
+ cat ${PULL_THROUGH_CACHE_CONFIG} | sed ' s/imageDigestSources/imageContentSources/g' >> ${CONFIG}
406
+ else
407
+ cat ${PULL_THROUGH_CACHE_CONFIG} >> ${CONFIG}
408
+ fi
404
409
else
405
410
echo " $( date -u --rfc-3339=seconds) - pull-through cache configuration not found. not updating install-config"
406
411
fi
You can’t perform that action at this time.
0 commit comments