fix test commit format

The newer versions of git are checking the ownership of directories.
Since the `/workdir` is a shared directory with ownership of buildkite,
we need to add an exception for it.

Signed-off-by: Andreea Florescu <fandree@amazon.com>
This commit is contained in:
Andreea Florescu
2022-08-26 11:50:52 +03:00
committed by Alexandru Agache
parent b3ed1c9253
commit 6fbd7c7355

View File

@@ -34,6 +34,11 @@ def test_commit_format():
60 characters for the title and 75 characters for description
lines) and if commits are signed.
"""
# Newer versions of git check the ownership of directories.
# We need to add an exception for /workdir which is shared, so that
# the git commands don't fail.
config_cmd = "git config --global --add safe.directory /workdir"
subprocess.run(config_cmd, shell=True, check=True)
# Fetch the upstream repository.
fetch_base_cmd = "git fetch {} {}".format(REMOTE, BASE_BRANCH)
try: