ci: Add a commit validation entrypoint

This commit is contained in:
Colin Walters 2021-02-03 00:42:05 +00:00 committed by OpenShift Merge Robot
parent 4dd80a8b9c
commit 9b2e78ed05
2 changed files with 8 additions and 4 deletions

View File

@ -30,11 +30,9 @@ codestyle: {
cosaPod(buildroot: true) { cosaPod(buildroot: true) {
checkout scm checkout scm
shwrap(""" shwrap("""
# Jenkins by default only fetches the branch it's testing. Explicitly fetch master # Ensures that we get refs to aid `git describe`
# for ci-commitmessage-submodules.sh
git fetch origin +refs/heads/master:refs/remotes/origin/master git fetch origin +refs/heads/master:refs/remotes/origin/master
ci/ci-commitmessage-submodules.sh ci/commit-validation.sh
ci/codestyle.sh
""") """)
} }
}, },

6
ci/commit-validation.sh Executable file
View File

@ -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