Skip to content

Commit 2dbb2c5

Browse files
fanquakePastaPastaPasta
authored andcommitted
Merge 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@fa00160 Zero-1729: tACK fa00160 fanquake: untested ACK fa00160 Tree-SHA512: 8a13a67d325f2477f4088d1034f0d5e4e04937a01ee3c738435fe66394c02b9f33225529952ad331b0ba19b63ca4b2f26911cb5d264890159840cf3e09085969
1 parent fec52a2 commit 2dbb2c5

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

.cirrus.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@ env:
1313
base_template: &BASE_TEMPLATE
1414
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
1515
merge_base_script:
16-
- if [ "$CIRRUS_PR" = "" ]; then exit 0; fi
16+
# Unconditionally install git (used in fingerprint_script) and set the
17+
# default git author name (used in verify-commits.py)
1718
- bash -c "$PACKAGE_MANAGER_INSTALL git"
18-
- git fetch $CIRRUS_REPO_CLONE_URL $CIRRUS_BASE_BRANCH
1919
- git config --global user.email "[email protected]"
2020
- git config --global user.name "ci"
21+
- if [ "$CIRRUS_PR" = "" ]; then exit 0; fi
22+
- git fetch $CIRRUS_REPO_CLONE_URL $CIRRUS_BASE_BRANCH
2123
- git merge FETCH_HEAD # Merge base to detect silent merge conflicts
2224
stateful: false # https://cirrus-ci.org/guide/writing-tasks/#stateful-tasks
2325

ci/lint/06_script.sh

+8-3
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,14 @@ test/lint/git-subtree-check.sh src/leveldb
2828
test/lint/check-doc.py
2929
test/lint/all-lint.py
3030

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

0 commit comments

Comments
 (0)