File tree Expand file tree Collapse file tree 4 files changed +29
-16
lines changed
Expand file tree Collapse file tree 4 files changed +29
-16
lines changed Original file line number Diff line number Diff line change @@ -228,14 +228,8 @@ repos:
228228
229229 - id : regenerate-multicluster-rbac
230230 name : Regenerate multi-cluster RBAC samples
231- entry : bash
232- args :
233- - -c
234- - |
235- cd pkg/kubectl-mongodb/common && \
236- EXPORT_RBAC_SAMPLES=true go test ./... -run TestPrintingOutRolesServiceAccountsAndRoleBindings && \
237- git add ../../../public/samples/multi-cluster-cli-gitops
238- language : system
231+ entry : scripts/dev/regenerate_multicluster_rbac.sh
232+ language : script
239233 files : ^(cmd/kubectl-mongodb|pkg/kubectl-mongodb)/
240234 pass_filenames : false
241235
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ set -Eeou pipefail
3+
4+ # Source the environment context to get go in PATH
5+ # shellcheck disable=SC1091
6+ source scripts/dev/set_env_context.sh
7+
8+ echo " Regenerating multi-cluster RBAC samples"
9+ cd pkg/kubectl-mongodb/common
10+ EXPORT_RBAC_SAMPLES=true go test ./... -run TestPrintingOutRolesServiceAccountsAndRoleBindings
11+ git add ../../../public/samples/multi-cluster-cli-gitops
Original file line number Diff line number Diff line change @@ -6,16 +6,20 @@ initial_index_state=$(git diff --name-only --cached --diff-filter=AM)
66
77export EVERGREEN_MODE=true
88
9- # Install pre-commit if not available
10- if ! command -v pre-commit > /dev/null 2>&1 ; then
11- echo " Installing pre-commit..."
12- pip install pre-commit
13- # Add ~/.local/bin to PATH if it exists (pip installs scripts there)
14- if [[ -d " ${HOME} /.local/bin" ]]; then
15- export PATH=" ${HOME} /.local/bin:${PATH} "
16- fi
9+ # Source the environment context (sets up PATH for go, etc.)
10+ # This is created by clone->setup_context step in CI
11+ # shellcheck disable=SC1091
12+ source scripts/dev/set_env_context.sh
13+
14+ # Activate the venv if it exists (CI creates this via python_venv setup step)
15+ # The venv contains pre-commit installed from requirements.txt
16+ if [[ -f " ${PROJECT_DIR} /venv/bin/activate" ]]; then
17+ echo " Activating venv..."
18+ # shellcheck disable=SC1091
19+ source " ${PROJECT_DIR} /venv/bin/activate"
1720fi
1821
22+ # pre-commit should now be available from the venv
1923echo " Running pre-commit hooks..."
2024echo " pre-commit version: $( pre-commit --version) "
2125
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22set -Eeou pipefail
33
4+ # Source the environment context to get go in PATH
5+ # shellcheck disable=SC1091
6+ source scripts/dev/set_env_context.sh
7+
48# Set required version
59required_version=" v2.0.2"
610
You can’t perform that action at this time.
0 commit comments