From 777f25d91c79f4734cfec07eb676fcb937cd3aea Mon Sep 17 00:00:00 2001 From: Rafael Guterres Jeffman <rjeffman@redhat.com> Date: Wed, 7 Sep 2022 15:06:04 -0300 Subject: [PATCH] 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. --- utils/set_test_modules | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/utils/set_test_modules b/utils/set_test_modules index 6f73ef87..9f94d2c7 100644 --- a/utils/set_test_modules +++ b/utils/set_test_modules @@ -18,13 +18,11 @@ pushd "${TOPDIR}" >/dev/null 2>&1 || die "Failed to change directory." files_list=$(mktemp) -if [ -z "$BASE_BRANCH" ] -then - git remote add _temp https://github.com/freeipa/ansible-freeipa - git fetch --prune --no-tags --quiet _temp - BASE_BRANCH="master" -fi -git diff "${BASE_BRANCH}" --name-only > "${files_list}" +remote="$(basename $(mktemp -u remote_XXXXXX))" +git remote add ${remote} https://github.com/freeipa/ansible-freeipa +git fetch --prune --no-tags --quiet ${remote} +git diff "${remote}/master" --name-only > "${files_list}" +git remote remove ${remote} # Get all modules that should have tests executed enabled_modules="$(python utils/get_test_modules.py $(cat "${files_list}"))" -- GitLab