ci: Allow passing HEAD commit to ci-commitmessage-submodules.sh

Jenkins' `checkout scm` gives us the exact commit that we're testing.
Allow passing that to the submodule commit message checker so it doesn't
use `HEAD` (which is likely GitHub's merge commit).

Closes: #1900
Approved by: cgwalters
This commit is contained in:
Jonathan Lebon 2019-09-06 15:02:33 -04:00 committed by Atomic Bot
parent 6d017644d7
commit c7814dd0ed

View File

@ -16,9 +16,9 @@ dn=$(dirname $0)
# It's very common for people to accidentally change submodules, and having this
# requirement is a small hurdle to pass.
# if running under PAPR, use the branch/PR HEAD actually
# being tested rather than the merge sha
HEAD=${PAPR_COMMIT:-HEAD}
# If passed the commit, use that. Otherwise, if running under PAPR, use the
# branch/PR HEAD actually being tested rather than the merge sha
HEAD=${1:-${PAPR_COMMIT:-HEAD}}
tmpd=$(mktemp -d)
touch ${tmpd}/.tmpdir