ci: fix incorrect usage of target determinator (#59171)

This commit is contained in:
Jean-Hadrien Chabran 2023-12-21 15:50:29 +00:00 committed by GitHub
parent 721eb34664
commit 6a67b76877
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 4 deletions

2
.gitignore vendored
View File

@ -174,7 +174,7 @@ index.scip
/dev/backcompat/back_compat_migrations.patch
# Generated on CI only
.aspect/bazelrc/ci.sourcegraph.bazelrc
.aspect/bazelrc/ci.generated.bazelrc
# nix
result

3
cmd/executor/ci-should-rebuild.sh Normal file → Executable file
View File

@ -13,8 +13,7 @@ set -eu
changes_count=$(target-determinator \
--verbose \
--targets \
//cmd/executor/vm-image:ami.push \
//cmd/executor/docker-mirror \
"//cmd/executor/vm-image:ami.build union //cmd/executor/docker-mirror:ami.build" \
HEAD^ \
| wc -l
)

View File

@ -16,7 +16,7 @@ cd "${BUILD_WORKSPACE_DIRECTORY}"
bazel configure
if [ "${CI:-}" ]; then
git ls-files --exclude-standard --others | grep -v .aspect/bazelrc/ci.generated.bazelrc | xargs git add --intent-to-add || true
git ls-files --exclude-standard --others | xargs git add --intent-to-add || true
diff_file=$(mktemp)
trap 'rm -f "${diff_file}"' EXIT