Build the embedded admin UI from CyberCoveLLC/threshold-ui

- internal/ui/VERSION pins the threshold-ui commit
- scripts/uiupdate.sh and scripts/build-ui.sh clone
  https://repo.anhonesthost.net/CyberCoveLLC/threshold-ui.git; the
  GitHub artifact download path (hashicorp/boundary-ui) is removed
- clone/embed directory renamed .tmp/boundary-ui -> .tmp/threshold-ui
  (Makefile, assets.go, .github build.yml paths)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
CyberCoveandClaude Sonnet 5.5 committed 2026-10-12 12:44:26 -07:00
1 parent 764bb27d54
commit 89e73b4aa1
7 files changed
+22 -62

No files matched your search

+4 -44
View File
@@ -14,24 +14,9 @@ if [ -z "$UI_VERSION_FILE" ]; then
fi
UI_EDITION=$(make --no-print-directory edition)
# allow override for the source of ui files
# used by end-to-end tests to build enterprise edition from community files
# UI_SRC_OVERRIDE will override which edition is pulled
# but UI_EDITION_SRC will still determine the build version
if [ -n "$UI_SRC_OVERRIDE" ]; then
UI_SRC=$UI_SRC_OVERRIDE
else
UI_SRC=$UI_EDITION
fi
if [ $UI_SRC == "oss" ]; then
UI_REPO=https://github.com/hashicorp/boundary-ui
REPO_NAME=boundary-ui
else
UI_VERSION_FILE="${UI_VERSION_FILE}_ent"
UI_REPO=https://github.com/hashicorp/boundary-ui-enterprise
REPO_NAME=boundary-ui-enterprise
fi
# Threshold ships a single (community) edition of the admin UI, built from the
# CyberCoveLLC/threshold-ui fork of hashicorp/boundary-ui.
UI_REPO=${UI_REPO:-https://repo.anhonesthost.net/CyberCoveLLC/threshold-ui.git}
UI_CURRENT_COMMIT=$(head -n1 < "${UI_VERSION_FILE}" | cut -d' ' -f1)
@@ -42,31 +27,6 @@ else
echo "==> Building custom UI version $UI_COMMITISH"
fi;
if which gh &> /dev/null; then
echo "Found gh cli, attempting to download ui assets"
artifact_id=$(gh api "repos/hashicorp/${REPO_NAME}/actions/artifacts" --paginate | \
jq ".artifacts[] | select(.workflow_run.head_sha == \"${UI_COMMITISH}f\" and .name == \"admin-ui-${UI_SRC}\")" | \
jq --slurp '.[0]' | \
jq -r '.id')
if [[ "${artifact_id}" != "null" ]]; then
echo "Downloading artifact: ${artifact_id} for admin-ui-${UI_SRC} ${UI_COMMITISH}"
tmp_dir=$(mktemp -d)
gh api "repos/hashicorp/${REPO_NAME}/actions/artifacts/${artifact_id}/zip" > "${tmp_dir}/boundary-ui.zip"
trap 'rm -rf ${tmp_dir}' EXIT
# remove any previous artifact download or git clone
rm -rf "${UI_CLONE_DIR}"
mkdir -p "${UI_CLONE_DIR}/ui/admin/dist"
unzip "${tmp_dir}/boundary-ui.zip" -d "${UI_CLONE_DIR}/ui/admin/dist"
exit $?
else
echo "could not find artifact: admin-ui-${UI_SRC} ${UI_COMMITISH}, falling back to git clone"
fi
fi
if ! which pnpm &> /dev/null; then
echo "Pnpm must be installed to build ui assets from a git clone.\nPlease ensure Node v20+ and Pnpm v10+ are installed."
exit 1
@@ -90,6 +50,6 @@ git checkout "${UI_COMMITISH}"
git pull --ff-only origin "${UI_COMMITISH}"
git reset --hard "${UI_COMMITISH}"
pnpm install
pnpm install --frozen-lockfile --filter "admin..."
EDITION=${UI_EDITION} pnpm build
popd
+3 -8
View File
@@ -13,14 +13,9 @@ if [ -z "$UI_COMMITISH" ]; then
echo "Must set UI_COMMITISH"; exit 1
fi
UI_EDITION=$(make --no-print-directory edition)
if [ "$UI_EDITION" == "oss" ]; then
UI_REPO=https://github.com/hashicorp/boundary-ui
else
UI_VERSION_FILE="${UI_VERSION_FILE}_ent"
UI_REPO=https://github.com/hashicorp/boundary-ui-enterprise
fi
# Threshold ships a single (community) edition of the admin UI, built from the
# CyberCoveLLC/threshold-ui fork of hashicorp/boundary-ui.
UI_REPO=${UI_REPO:-https://repo.anhonesthost.net/CyberCoveLLC/threshold-ui.git}
shafileabs="$(pwd)/${UI_VERSION_FILE}"
V="$(git ls-remote ${UI_REPO} ${UI_COMMITISH})"