Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions 01_install_requirements.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
set -ex
set -euxo pipefail


source logging.sh
Expand All @@ -10,7 +10,7 @@ source validation.sh

early_deploy_validation true

if [ -z "${METAL3_DEV_ENV}" ]; then
if [ -z "${METAL3_DEV_ENV:-}" ]; then
export REPO_PATH=${WORKING_DIR}
sync_repo_and_patch metal3-dev-env https://github.com/metal3-io/metal3-dev-env.git
pushd ${METAL3_DEV_ENV_PATH}
Expand Down Expand Up @@ -153,7 +153,7 @@ GO_CHECKSUM="$(
)"

if [ -z "$GO_CHECKSUM" ]; then
echo "Error: Could not find checksum for $VERSION ($OS/$ARCH)" >&2
echo "Error: Could not find checksum for $VERSION ($OS/$GOARCH)" >&2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this line is currently unreachable with set -u

else
echo "Checksum: $GO_CHECKSUM"
fi
Expand All @@ -180,17 +180,17 @@ ANSIBLE_FORCE_COLOR=true ansible-playbook \
-b -vvv vm-setup/install-package-playbook.yml
popd

if [ -n "${KNI_INSTALL_FROM_GIT}" ]; then
if [ -n "${KNI_INSTALL_FROM_GIT:-}" ]; then
# zip is required for building the installer from source
sudo dnf -y install zip
fi

# Install nfs for persistent volumes
if [ "${PERSISTENT_IMAGEREG}" == true ] ; then
if [ "${PERSISTENT_IMAGEREG:-}" == true ] ; then
sudo dnf -y install nfs-utils
fi

if [[ "${NODES_PLATFORM}" == "baremetal" ]] ; then
if [[ "${NODES_PLATFORM:-}" == "baremetal" ]] ; then
sudo dnf -y install ipmitool
fi

Expand Down
11 changes: 7 additions & 4 deletions common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ export PATH="/usr/local/go/bin:$HOME/.local/bin:$PATH"
# Set a PS4 value which logs the script name and line #.
export PS4='+(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'

eval "$(go env)"

export PATH="${GOPATH}/bin:$PATH"
if command -v go &>/dev/null; then
eval "$(go env)"
export PATH="${GOPATH}/bin:$PATH"
fi

# Ensure if a go program crashes we get a coredump
#
Expand Down Expand Up @@ -169,7 +170,9 @@ if [ -z "${OPENSHIFT_RELEASE_IMAGE:-}" ]; then
fi
fi
export OPENSHIFT_RELEASE_IMAGE="${OPENSHIFT_RELEASE_IMAGE:-$LATEST_CI_IMAGE}"
export OPENSHIFT_INSTALL_PATH="${OPENSHIFT_INSTALL_PATH:-$GOPATH/src/github.com/openshift/installer}"
if [[ -n "${GOPATH:-}" ]]; then
export OPENSHIFT_INSTALL_PATH="${OPENSHIFT_INSTALL_PATH:-$GOPATH/src/github.com/openshift/installer}"
fi

# Override the image to use for installing hive
export HIVE_DEPLOY_IMAGE="${HIVE_DEPLOY_IMAGE:-registry.ci.openshift.org/openshift/hive-v4.0:hive}"
Expand Down