ci: pin enterprise repo to explicit commit hash (#35957)

* ci: pin enterprise repo to explicit commit hash

Introduces an enterprise.pin file that explicitly pins the enterprise
commit the server is built and tested against. This replaces the
implicit HEAD checkout, eliminating the CI race condition for all
cross-repo changes.

Changes:
- enterprise.pin: pinned enterprise commit SHA
- server/Makefile: new bump-enterprise target to update the pin

Co-authored-by: Claude <claude@anthropic.com>

* ci: fix bump-enterprise error handling and path resolution

- Add set -e so recipe fails fast if git rev-parse fails
- Use $(ROOT)/../enterprise.pin instead of ../enterprise.pin to
  resolve path relative to Makefile location, not CWD

Co-authored-by: Claude <claude@anthropic.com>

* fix: add missing 'all' to .PHONY declaration in Makefile

Pre-existing issue flagged by CodeRabbit — the 'all' target (line 199)
was never declared phony. Out of scope for the enterprise.pin change
but trivial to fix.

Co-authored-by: Claude <claude@anthropic.com>

* ci: trigger Enterprise CI re-run

Co-authored-by: Claude <claude@anthropic.com>

---------

Co-authored-by: Claude <claude@anthropic.com>
This commit is contained in:
Pavel Zeman
2026-04-16 20:51:59 -04:00
committed by GitHub
parent f6341a17ba
commit 23ab604b96
2 changed files with 17 additions and 1 deletions
+3
View File
@@ -0,0 +1,3 @@
# Enterprise commit this server branch is tested against.
# Updated via: make bump-enterprise
b03e11ccf5dca59cc3ffd2ed8c73604c5a5a48b8
+14 -1
View File
@@ -1,4 +1,4 @@
.PHONY: build package run stop run-client run-server run-node run-haserver stop-haserver stop-client stop-server restart restart-server restart-client restart-haserver start-docker update-docker clean-dist clean nuke check-style check-client-style check-server-style check-unit-tests test dist run-client-tests setup-run-client-tests cleanup-run-client-tests test-client build-linux build-osx build-freebsd build-windows package-prep package-linux package-osx package-windows internal-test-web-client vet run-server-for-web-client-tests diff-config prepackaged-plugins prepackaged-binaries test-server test-server-ee test-server-elasticsearch test-server-quick test-server-race test-mmctl-unit test-mmctl-e2e test-mmctl test-mmctl-coverage mmctl-build mmctl-docs new-migration migrations-extract test-public mocks-public run-server-faketime
.PHONY: all build package run stop run-client run-server run-node run-haserver stop-haserver stop-client stop-server restart restart-server restart-client restart-haserver start-docker update-docker clean-dist clean nuke check-style check-client-style check-server-style check-unit-tests test dist run-client-tests setup-run-client-tests cleanup-run-client-tests test-client build-linux build-osx build-freebsd build-windows package-prep package-linux package-osx package-windows internal-test-web-client vet run-server-for-web-client-tests diff-config prepackaged-plugins prepackaged-binaries test-server test-server-ee test-server-elasticsearch test-server-quick test-server-race test-mmctl-unit test-mmctl-e2e test-mmctl test-mmctl-coverage mmctl-build mmctl-docs new-migration migrations-extract test-public mocks-public run-server-faketime bump-enterprise
ROOT := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
@@ -431,6 +431,19 @@ ifneq ($(SKIP_SETUP_GO_WORK),true)
fi
endif
bump-enterprise: ## Update enterprise.pin to the current enterprise HEAD
@if [ ! -d "$(BUILD_ENTERPRISE_DIR)" ]; then \
echo "Enterprise directory not found at $(BUILD_ENTERPRISE_DIR)"; \
exit 1; \
fi
@set -e; \
SHA=$$(cd "$(BUILD_ENTERPRISE_DIR)" && git rev-parse HEAD); \
PIN_FILE="$(ROOT)/../enterprise.pin"; \
echo "# Enterprise commit this server branch is tested against." > "$$PIN_FILE"; \
echo "# Updated via: make bump-enterprise" >> "$$PIN_FILE"; \
echo "$$SHA" >> "$$PIN_FILE"; \
echo "Updated enterprise.pin to $$SHA"
check-style: plugin-checker vet golangci-lint ## Runs style/lint checks
gotestsum: