Skip to content

Commit

Permalink
Merge pull request #1486 from Nordix/fix/htpasswd-PEPPI
Browse files Browse the repository at this point in the history
🐛 Fix htpasswd command not found
  • Loading branch information
metal3-io-bot authored Dec 12, 2023
2 parents 0b1d7bb + dfc7579 commit 721f73b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions hack/ci-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ BMO_E2E_EMULATOR=${BMO_E2E_EMULATOR:-"sushy-tools"}
"${REPO_ROOT}/hack/e2e/ensure_go.sh"
export PATH="${PATH}:/usr/local/go/bin"
"${REPO_ROOT}/hack/e2e/ensure_minikube.sh"
"${REPO_ROOT}/hack/e2e/ensure_htpasswd.sh"
# CAPI test framework uses kubectl in the background
"${REPO_ROOT}/hack/e2e/ensure_kubectl.sh"

Expand Down
15 changes: 15 additions & 0 deletions hack/e2e/ensure_htpasswd.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash

set -eux

# Check if htpasswd is installed and install it if not
verify_htpasswd()
{
if ! [ -x "$(command -v htpasswd)" ]; then
echo "htpasswd could not be found, installing..."
sudo apt-get update
sudo apt-get install -y apache2-utils
fi
}

verify_htpasswd

0 comments on commit 721f73b

Please sign in to comment.