Skip to content

Commit fd627a0

Browse files
authored
HYPERFLEET-877 - ci: bump hyperfleet-hooks to v0.1.2 (#78645)
Replace go install (slow ~3min compile) with pre-built binary download from GitHub releases (~2s). Also fixes PR commit range calculation to only validate PR commits instead of the entire repository history.
1 parent dad51ec commit fd627a0

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

ci-operator/step-registry/hyperfleet/commitlint/hyperfleet-commitlint-commands.sh

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,14 @@ if [ -z "${PULL_BASE_SHA:-}" ]; then
99
exit 1
1010
fi
1111

12-
export HOME=/tmp
13-
export GOPATH=/tmp/go
14-
export GOMODCACHE=/tmp/go-mod
15-
export GOCACHE=/tmp/go-build
16-
export PATH="$GOPATH/bin:$PATH"
17-
unset GOFLAGS
12+
HOOKS_VERSION="v0.1.2"
13+
HOOKS_URL="https://github.com/openshift-hyperfleet/hyperfleet-hooks/releases/download/${HOOKS_VERSION}/hyperfleet-hooks-linux-amd64"
14+
HOOKS_BIN="/tmp/hyperfleet-hooks"
1815

19-
echo "Installing hyperfleet-hooks..."
20-
go install github.com/openshift-hyperfleet/hyperfleet-hooks/cmd/hyperfleet-hooks@v0.1.1
16+
echo "Downloading hyperfleet-hooks ${HOOKS_VERSION}..."
17+
curl -fsSL -o "${HOOKS_BIN}" "${HOOKS_URL}"
18+
chmod +x "${HOOKS_BIN}"
19+
export PATH="/tmp:$PATH"
2120

2221
echo "Running commitlint validation..."
2322
hyperfleet-hooks commitlint --pr

0 commit comments

Comments
 (0)