Merge pull request #639 from flacatus/nightly_fails_checks

Fix nightly bundle check
pull/603/head
Flavius Lacatusu 2021-01-22 08:42:28 +01:00 committed by GitHub
commit 9df341414a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 6 deletions

View File

@ -70,22 +70,30 @@ installOperatorSDK() {
fi
}
isActualNightlyOlmBundleCSVFiles() {
cd "${ROOT_PROJECT_DIR}"
checkNightlyOlmBundle() {
local CSV_FILE_KUBERNETES="deploy/olm-catalog/eclipse-che-preview-kubernetes/manifests/che-operator.clusterserviceversion.yaml"
local CSV_FILE_OPENSHIFT="deploy/olm-catalog/eclipse-che-preview-openshift/manifests/che-operator.clusterserviceversion.yaml"
local CRD_FILE_KUBERNETES="deploy/olm-catalog/eclipse-che-preview-kubernetes/manifests/org_v1_che_crd.yaml"
local CRD_FILE_OPENSHIFT="deploy/olm-catalog/eclipse-che-preview-openshift/manifests/org_v1_che_crd.yaml"
export NO_DATE_UPDATE="true"
export NO_INCREMENT="true"
source "${ROOT_PROJECT_DIR}/olm/update-nightly-bundle.sh"
CSV_FILE_KUBERNETES="deploy/olm-catalog/eclipse-che-preview-kubernetes/manifests/che-operator.clusterserviceversion.yaml"
CSV_FILE_OPENSHIFT="deploy/olm-catalog/eclipse-che-preview-openshift/manifests/che-operator.clusterserviceversion.yaml"
cd "${ROOT_PROJECT_DIR}"
source "${ROOT_PROJECT_DIR}/olm/update-nightly-bundle.sh"
IFS=$'\n' read -d '' -r -a changedFiles < <( git ls-files -m ) || true
for file in "${changedFiles[@]}"
do
echo $file
if [ "${CSV_FILE_KUBERNETES}" == "${file}" ] || [ "${CSV_FILE_OPENSHIFT}" == "${file}" ]; then
echo "[ERROR] Nightly bundle file ${file} should be updated in your pr, please. Use script 'che-operator/olm/update-nightly-bundle.sh' for this purpose."
exit 1
fi
if [ "${CRD_FILE_KUBERNETES}" == "${file}" ] || [ "${CRD_FILE_OPENSHIFT}" == "${file}" ]; then
echo "[ERROR] Nightly bundle file ${file} should be updated in your pr, please. Use script 'che-operator/olm/update-nightly-bundle.sh' for this purpose."
exit 1
fi
done
echo "[INFO] Nightly Olm bundle is in actual state."
}
@ -93,6 +101,6 @@ isActualNightlyOlmBundleCSVFiles() {
installYq
installOperatorSDK
check_che_crds
isActualNightlyOlmBundleCSVFiles
checkNightlyOlmBundle
echo "[INFO] Done."