Skip to content

Commit 19aa5af

Browse files
committed
Merge bitcoin/bitcoin#22744: ci: Re-enable verify-commits.py check
fa00160 ci: Re-enable verify-commits.py check (MarcoFalke) fa880b1 ci: Unconditionally set the global git author name in cirrys.yml (MarcoFalke) Pull request description: Might be useful to detect bugs in the script itself or an accidentally missed signature. ACKs for top commit: josibake: ACK bitcoin/bitcoin@fa00160 Zero-1729: tACK fa00160 fanquake: untested ACK fa00160 Tree-SHA512: 8a13a67d325f2477f4088d1034f0d5e4e04937a01ee3c738435fe66394c02b9f33225529952ad331b0ba19b63ca4b2f26911cb5d264890159840cf3e09085969
2 parents 7be143a + fa00160 commit 19aa5af

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

.cirrus.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,13 @@ persistent_worker_template: &PERSISTENT_WORKER_TEMPLATE
2121
base_template: &BASE_TEMPLATE
2222
skip: $CIRRUS_REPO_FULL_NAME == "bitcoin-core/gui" && $CIRRUS_PR == "" # No need to run on the read-only mirror, unless it is a PR. https://cirrus-ci.org/guide/writing-tasks/#conditional-task-execution
2323
merge_base_script:
24+
# Unconditionally install git (used in fingerprint_script) and set the
25+
# default git author name (used in verify-commits.py)
2426
- bash -c "$PACKAGE_MANAGER_INSTALL git"
25-
- if [ "$CIRRUS_PR" = "" ]; then exit 0; fi
26-
- git fetch $CIRRUS_REPO_CLONE_URL $CIRRUS_BASE_BRANCH
2727
- git config --global user.email "[email protected]"
2828
- git config --global user.name "ci"
29+
- if [ "$CIRRUS_PR" = "" ]; then exit 0; fi
30+
- git fetch $CIRRUS_REPO_CLONE_URL $CIRRUS_BASE_BRANCH
2931
- git merge FETCH_HEAD # Merge base to detect silent merge conflicts
3032
stateful: false # https://cirrus-ci.org/guide/writing-tasks/#stateful-tasks
3133

ci/lint/06_script.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,15 @@ test/lint/git-subtree-check.sh src/crc32c
2323
test/lint/check-doc.py
2424
test/lint/lint-all.sh
2525

26-
if [ "$CIRRUS_REPO_FULL_NAME" = "bitcoin/bitcoin" ] && [ -n "$CIRRUS_CRON" ]; then
27-
git log --merges --before="2 days ago" -1 --format='%H' > ./contrib/verify-commits/trusted-sha512-root-commit
26+
if [ "$CIRRUS_REPO_FULL_NAME" = "bitcoin/bitcoin" ] && [ "$CIRRUS_PR" = "" ] ; then
27+
# Sanity check only the last few commits to get notified of missing sigs,
28+
# missing keys, or expired keys. Usually there is only one new merge commit
29+
# per push on the master branch and a few commits on release branches, so
30+
# sanity checking only a few (10) commits seems sufficient and cheap.
31+
git log HEAD~10 -1 --format='%H' > ./contrib/verify-commits/trusted-sha512-root-commit
32+
git log HEAD~10 -1 --format='%H' > ./contrib/verify-commits/trusted-git-root
2833
${CI_RETRY_EXE} gpg --keyserver hkps://keys.openpgp.org --recv-keys $(<contrib/verify-commits/trusted-keys) &&
29-
./contrib/verify-commits/verify-commits.py --clean-merge=2;
34+
./contrib/verify-commits/verify-commits.py;
3035
fi
3136

3237
echo

0 commit comments

Comments
 (0)