ci/jenkins: don't pass GIT_COMMIT to ci-commitmessage-submodules.sh

Jenkins is tricky: it does an initial checkout, merges the PR head into
the target branch, then creates the pod. Once in the pod, we do a
`checkout scm` which *also* merges the PR head into the target branch.
However, the `change.GIT_COMMIT` variable we get from that is set to the
SHA of the first merge, not the second one. Which... yeah is super
confusing since we explicitly assign `change` from that `checkout scm`
operation. So that's probably a valid bug.

This was then throwing off `ci-commitmessage-submodules.sh` since it
didn't find the merge commit in the graph.

Anyway, not going to spend more time on this. Let's just not pass any
commit at all. The git range `origin/master..HEAD` already does what we
want (go through all the commits in HEAD *not* in master).
This commit is contained in:
Jonathan Lebon 2019-10-03 15:14:11 -04:00 committed by OpenShift Merge Robot
parent 010f269492
commit 289af613a9

View File

@ -25,13 +25,13 @@ parallel rpms: {
},
codestyle: {
coreos.pod(image: 'quay.io/coreos-assembler/coreos-assembler:latest') {
def change = checkout scm
checkout scm
sh """
set -euo pipefail
# Jenkins by default only fetches the branch it's testing. Explicitly fetch master
# for ci-commitmessage-submodules.sh
git fetch origin +refs/heads/master:refs/remotes/origin/master
ci/ci-commitmessage-submodules.sh ${change.GIT_COMMIT}
ci/ci-commitmessage-submodules.sh
ci/codestyle.sh
"""
}