From 9b2e78ed054d85f67139612ae9fa621eac130a76 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Wed, 3 Feb 2021 00:42:05 +0000 Subject: [PATCH] ci: Add a commit validation entrypoint --- .cci.jenkinsfile | 6 ++---- ci/commit-validation.sh | 6 ++++++ 2 files changed, 8 insertions(+), 4 deletions(-) create mode 100755 ci/commit-validation.sh diff --git a/.cci.jenkinsfile b/.cci.jenkinsfile index c90dc13e..70035e42 100644 --- a/.cci.jenkinsfile +++ b/.cci.jenkinsfile @@ -30,11 +30,9 @@ codestyle: { cosaPod(buildroot: true) { checkout scm shwrap(""" - # Jenkins by default only fetches the branch it's testing. Explicitly fetch master - # for ci-commitmessage-submodules.sh + # Ensures that we get refs to aid `git describe` git fetch origin +refs/heads/master:refs/remotes/origin/master - ci/ci-commitmessage-submodules.sh - ci/codestyle.sh + ci/commit-validation.sh """) } }, diff --git a/ci/commit-validation.sh b/ci/commit-validation.sh new file mode 100755 index 00000000..26eb0359 --- /dev/null +++ b/ci/commit-validation.sh @@ -0,0 +1,6 @@ +#!/bin/bash +set -xeuo pipefail +# Add cheap (non-building) checks here +dn=$(dirname $0) +${dn}/codestyle.sh +${dn}/ci-commitmessage-submodules.sh