From 289af613a9566d16da27b6a1555cd864c5205d33 Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Thu, 3 Oct 2019 15:14:11 -0400 Subject: [PATCH] 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). --- .cci.jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.cci.jenkinsfile b/.cci.jenkinsfile index 648d9b29..5e9c7f28 100644 --- a/.cci.jenkinsfile +++ b/.cci.jenkinsfile @@ -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 """ }