Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
k-rister committed Nov 4, 2024
1 parent 4557c4a commit 3eda0cb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 4 additions & 4 deletions crucible-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,10 @@ for dep in $DEPENDENCIES; do
has_dependency $dep
done

if ! echo "${CRUCIBLE_ENGINE_QUAY_EXPIRATION_LENGTH}" | grep -q "[1-9][0-9]*[wm]"; then
exit_error "Invalid syntax for engine Quay expiration length. Expecting either '<integer>w' (for weeks) or '<integer>m' (for months)" ${EC_INVALID_QUAY_EXPIRATION_LENGTH}
fi

if [ ! -z ${CRUCIBLE_ENGINE_AUTH_FILE+x} ]; then
if [ ! -f $CRUCIBLE_ENGINE_AUTH_FILE ]; then
exit_error "Crucible authentication file not found. See --engine-auth-file for details." $EC_AUTH_FILE_NOT_FOUND
Expand Down Expand Up @@ -565,10 +569,6 @@ if [ -n "${CRUCIBLE_ENGINE_QUAY_EXPIRATION_REFRESH_API_URL}" ]; then
SYSCONFIG_CRUCIBLE_ENGINE_QUAY_EXPIRATION_REFRESH_API_URL="${CRUCIBLE_ENGINE_QUAY_EXPIRATION_REFRESH_API_URL}"
fi

if ! echo "${SYSCONFIG_CRUCIBLE_ENGINE_QUAY_EXPIRATION_LENGTH}" | grep -q "[1-9][0-9]*[wm]"; then
exit_error "Invalid syntax for engine Quay expiration length. Expecting either '<integer>w' (for weeks) or '<integer>m' (for months)" ${EC_INVALID_QUAY_EXPIRATION_LENGTH}
fi

REGISTRIES_CFG=${INSTALL_PATH}/config/registries.json
REGISTRIES_CFG_SCHEMA=${INSTALL_PATH}/schema/registries.json

Expand Down
2 changes: 0 additions & 2 deletions tests/test-installer
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,7 @@ start_test
# invalid quay expiration length
touch /tmp/auth-file.json
ec=$(grep EC_INVALID_QUAY_EXPIRATION_LENGTH= crucible-install.sh | cut -d '=' -f2)
cfgfile=$(grep SYSCONFIG= crucible-install.sh | cut -d '=' -f2 | sed 's/"//g')
# TODO(rfolco): temporary workaround until we make it distro generic
sudo mkdir -p $(dirname $cfgfile)
sudo ./crucible-install.sh \
--git-repo ${CRUCIBLE_DIR} \
--engine-registry myregistry.io/crucible \
Expand Down

0 comments on commit 3eda0cb

Please sign in to comment.