Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 5 additions & 13 deletions scripts/dev/generate_files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,19 +83,11 @@ update_release_json() {
}

regenerate_public_rbac_multi_cluster() {
if [[ -z "${EVERGREEN_MODE:-}" ]]; then
# According to the latest SSDLC recommendations, the CI needs to always check all the files. Not just delta.
git_last_changed=$(git ls-tree -r origin/master --name-only)
else
git_last_changed=$(git diff --cached --name-only --diff-filter=ACM origin/master)
fi

if echo "${git_last_changed}" | grep -q -e 'cmd/kubectl-mongodb' -e 'pkg/kubectl-mongodb'; then
echo 'regenerating multicluster RBAC public example'
pushd pkg/kubectl-mongodb/common/
EXPORT_RBAC_SAMPLES="true" go test ./... -run TestPrintingOutRolesServiceAccountsAndRoleBindings
popd
fi
echo 'regenerating multicluster RBAC public example'
pushd pkg/kubectl-mongodb/common/
EXPORT_RBAC_SAMPLES="true" go test ./... -run TestPrintingOutRolesServiceAccountsAndRoleBindings
popd
git add public/samples/multi-cluster-cli-gitops
}

update_licenses() {
Expand Down