upstream CI: Force retrieval of ansible-freeipa master.

This patch forces the addition of a remote repository pointing to the
main ansible-freeipa repo, and fetch its contents before confaring the
modified files. The remote repository is removed after the modified
file list is generated.
This commit is contained in:
Rafael Guterres Jeffman
2022-09-07 15:06:04 -03:00
parent d936a3794e
commit 777f25d91c

View File

@@ -18,13 +18,11 @@ pushd "${TOPDIR}" >/dev/null 2>&1 || die "Failed to change directory."
files_list=$(mktemp) files_list=$(mktemp)
if [ -z "$BASE_BRANCH" ] remote="$(basename $(mktemp -u remote_XXXXXX))"
then git remote add ${remote} https://github.com/freeipa/ansible-freeipa
git remote add _temp https://github.com/freeipa/ansible-freeipa git fetch --prune --no-tags --quiet ${remote}
git fetch --prune --no-tags --quiet _temp git diff "${remote}/master" --name-only > "${files_list}"
BASE_BRANCH="master" git remote remove ${remote}
fi
git diff "${BASE_BRANCH}" --name-only > "${files_list}"
# Get all modules that should have tests executed # Get all modules that should have tests executed
enabled_modules="$(python utils/get_test_modules.py $(cat "${files_list}"))" enabled_modules="$(python utils/get_test_modules.py $(cat "${files_list}"))"