Skip to content

Commit 4ed4bdc

Browse files
committed
script: ignore main branch when cleaning ci
Addresses failures like: Deleting refs: refs/heads/main refs/heads/wip-athakkar-testing-2025-02-11-1344 refs/heads/wip-choffman-fscrypt-021225 refs/heads/wip-dang-68336 refs/heads/wip-leonidc-7_1_hotfix refs/heads/wip-nia-testing-2025-02-12-0101 refs/heads/wip-nitzan-gil-perf-count-and-contention-detect refs/heads/wip-rf-perf-sections refs/heads/wip-sseshasa-test-stuck-backfill-squid-feb11-2024 refs/heads/wip-sseshasa-test-stuck-backfill-squid-feb12-2024 refs/heads/wip-yuri8-testing-2025-02-10-2350 To https://github.com/ceph/ceph-ci - [deleted] wip-athakkar-testing-2025-02-11-1344 - [deleted] wip-choffman-fscrypt-021225 - [deleted] wip-dang-68336 - [deleted] wip-leonidc-7_1_hotfix - [deleted] wip-nia-testing-2025-02-12-0101 - [deleted] wip-nitzan-gil-perf-count-and-contention-detect - [deleted] wip-rf-perf-sections - [deleted] wip-sseshasa-test-stuck-backfill-squid-feb11-2024 - [deleted] wip-sseshasa-test-stuck-backfill-squid-feb12-2024 - [deleted] wip-yuri8-testing-2025-02-10-2350 ! [remote rejected] main (refusing to delete the current branch: refs/heads/main) error: failed to push some refs to 'https://github.com/ceph/ceph-ci' Error: Process completed with exit code 1. Signed-off-by: Patrick Donnelly <[email protected]>
1 parent f54e6e2 commit 4ed4bdc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/script/clean-ci

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ function iterate_ci {
4747
commit=$(cut -f1 <<<"$commit_ref")
4848
ref=$(cut -f2 <<<"$commit_ref")
4949

50+
if [[ "$ref" == 'refs/heads/main' ]]; then
51+
eprintf 'Ignoring main branch'
52+
continue
53+
fi
54+
5055
eprintf 'Examining %s (commit %s)' "$ref" "$commit"
5156

5257
commit_date=$(git log -1 --format="%ct" "$commit")

0 commit comments

Comments
 (0)