Skip to content

Commit

Permalink
Merge pull request #54 from IBM/fix-csi-cr.yaml-file-path
Browse files Browse the repository at this point in the history
fixed to updated url path and fixed conditions
  • Loading branch information
bvered authored Jul 21, 2022
2 parents 83dc0c0 + 8f2b34a commit 37b4c67
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions hack/bundle-manifests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,19 @@ source hack/ensure-blockcsi-cryaml.sh

BUNDLE_METADATA_OPTS="${BUNDLE_CHANNELS} ${BUNDLE_DEFAULT_CHANNEL}"

# always start fresh and remove any previous artifacts that may exist
# Always start fresh and remove any previous artifacts that may exist
echo "Cleaning the previous artifacts that may exist..."
rm -rf "$(dirname ${BUNDLE_METADATA_DIR})"
mkdir -p "${BUNDLE_METADATA_DIR}"

# generate the file dependencies.yaml, which requires the minimum version of IBM Block CSI Operator.
# Generate the file dependencies.yaml, which requires the minimum version of IBM Block CSI Operator.
echo "Generating the file dependencies.yaml..."
cat << EOF > ${BUNDLE_METADATA_DIR}/dependencies.yaml
dependencies:
- type: olm.package
value:
packageName: ibm-block-csi-operator
version: ">=1.10.0"
version: ">=${BLOCK_CSI_RELEASE:1}"
EOF

echo "Generating bundle manifests and metadata..."
Expand Down
6 changes: 4 additions & 2 deletions hack/ensure-blockcsi-cryaml.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ set -e
source hack/common.sh

CSI_CR_PATH="config/manager/${BLOCK_CSI_CR_FILE}"
CSI_CR_URL="https://raw.githubusercontent.com/IBM/ibm-block-csi-operator/${BLOCK_CSI_RELEASE}/deploy/crds/${BLOCK_CSI_CR_FILE}"
CSI_SAMPLES_CR_PATH="config/samples/${BLOCK_CSI_CR_FILE}"
CSI_CR_URL="https://raw.githubusercontent.com/IBM/ibm-block-csi-operator/${BLOCK_CSI_RELEASE}/config/samples/${BLOCK_CSI_CR_FILE}"

if [ ! -f "${CSI_CR_PATH}" ] || [[ -f "${CSI_CR_PATH}" && "$(grep release "${CSI_CR_PATH}" | awk -F ': ' '{print $2}')" != ${BLOCK_CSI_RELEASE} ]]; then
if curl --head --silent --fail ${CSI_CR_URL} 2> /dev/null; then
echo "Downloading the IBM Block CSI CR file..."
curl -JL "${CSI_CR_URL}" -o "${CSI_CR_PATH}"
curl -JL "${CSI_CR_URL}" -o "${CSI_SAMPLES_CR_PATH}"
else
echo "Using the cached CR file ${BLOCK_CSI_CR_FILE}"
fi

0 comments on commit 37b4c67

Please sign in to comment.