Skip to content

Commit

Permalink
Cirrus: Fix missing git-enforced runtime identity
Browse files Browse the repository at this point in the history
Newer versions of git (like `2.35`) fail on certain operations (like
`rebase` and `am`) without a local identity.  Add a fake one from the
start, with a clearly identifiable test-value to avoid problems at
runtime.

Signed-off-by: Chris Evich <cevich@redhat.com>
  • Loading branch information
cevich committed Apr 21, 2022
1 parent cb09c26 commit 566b607
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ ext_svc_check_task:
else
git reset --hard $CIRRUS_CHANGE_IN_REPO
fi
# Some test operations & checks require a git "identity"
_gc='git config --file /root/.gitconfig'
$_gc user.email "TMcTestFace@example.com"
$_gc user.name "Testy McTestface"
make install.tools

setup_script: &setup '$GOSRC/$SCRIPT_BASE/setup_environment.sh'
Expand Down
5 changes: 5 additions & 0 deletions contrib/cirrus/setup_environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ cp hack/podman-registry /bin
# Make sure cni network plugins directory exists
mkdir -p /etc/cni/net.d

# Some test operations & checks require a git "identity"
_gc='git config --file /root/.gitconfig'
$_gc user.email "TMcTestFace@example.com"
$_gc user.name "Testy McTestface"

# Ensure that all lower-level contexts and child-processes have
# ready access to higher level orchestration (e.g Cirrus-CI)
# variables.
Expand Down

0 comments on commit 566b607

Please sign in to comment.