diff --git a/infra/azure/templates/group_tests.yml b/infra/azure/templates/group_tests.yml index 89953d4d3c..da18c2e3fb 100644 --- a/infra/azure/templates/group_tests.yml +++ b/infra/azure/templates/group_tests.yml @@ -16,48 +16,15 @@ parameters: default: false jobs: -- template: run_tests.yml - parameters: - group_number: 1 - number_of_groups: 3 - build_number: ${{ parameters.build_number }} - distro: ${{ parameters.distro }} - ansible_version: ${{ parameters.ansible_version }} - python_version: '< 3.12' - skip_git_test: ${{ parameters.skip_git_test }} - test_galaxy: ${{ parameters.test_galaxy }} -- template: run_tests.yml - parameters: - group_number: 2 - number_of_groups: 3 - build_number: ${{ parameters.build_number }} - distro: ${{ parameters.distro }} - ansible_version: ${{ parameters.ansible_version }} - python_version: '< 3.12' - skip_git_test: ${{ parameters.skip_git_test }} - test_galaxy: ${{ parameters.test_galaxy }} - -- template: run_tests.yml - parameters: - group_number: 3 - number_of_groups: 3 - build_number: ${{ parameters.build_number }} - distro: ${{ parameters.distro }} - ansible_version: ${{ parameters.ansible_version }} - python_version: '< 3.12' - skip_git_test: ${{ parameters.skip_git_test }} - test_galaxy: ${{ parameters.test_galaxy }} - -# Temporarily disabled due to ansible docker plugin issue. -# - template: run_tests.yml -# parameters: -# group_number: 1 -# number_of_groups: 1 -# build_number: ${{ parameters.build_number }} -# distro: ${{ parameters.distro }} -# ansible_version: ${{ parameters.ansible_version }} -# python_version: '< 3.12' -# skip_git_test: ${{ parameters.skip_git_test }} -# test_type: "not playbook" -# test_galaxy: ${{ parameters.test_galaxy }} +- ${{ each group in split('1,2,3', ',') }}: + - template: run_tests.yml + parameters: + group_number: ${{ group }} + number_of_groups: 3 + build_number: ${{ parameters.build_number }} + distro: ${{ parameters.distro }} + ansible_version: ${{ parameters.ansible_version }} + python_version: '< 3.12' + skip_git_test: ${{ parameters.skip_git_test }} + test_galaxy: ${{ parameters.test_galaxy }} diff --git a/infra/azure/templates/run_tests.yml b/infra/azure/templates/run_tests.yml index d4178db1e2..1f9bf9b382 100644 --- a/infra/azure/templates/run_tests.yml +++ b/infra/azure/templates/run_tests.yml @@ -43,7 +43,7 @@ jobs: python_version: ${{ parameters.python_version }} - bash: echo "##vso[task.setvariable variable=TOPDIR]${PWD}" - + - script: | . "${TOPDIR}/utils/set_test_modules" python3 utils/check_test_configuration.py ${{ parameters.distro }} @@ -54,7 +54,6 @@ jobs: - script: | git fetch --unshallow utils/build-galaxy-release.sh -i - cd ~/.ansible/collections/ansible_collections/freeipa/ansible_freeipa retryCountOnTaskFailure: 5 displayName: Build Galaxy release condition: ${{ parameters.test_galaxy }} @@ -66,6 +65,7 @@ jobs: echo "LIBRARY: ${ANSIBLE_LIBRARY}" echo "MODULE_UTILS: ${ANSIBLE_MODULE_UTILS}" . "${TOPDIR}/utils/set_test_modules" + [ "${{ parameters.test_galaxy }}" == "True" ] && cd ~/.ansible/collections/ansible_collections/freeipa/ansible_freeipa pytest \ -m "${{ parameters.test_type }}" \ --verbose \ @@ -78,9 +78,10 @@ jobs: displayName: Run playbook tests env: SKIP_GIT_TEST: ${{ parameters.skip_git_test }} - ANSIBLE_ROLES_PATH: "${PWD}/roles" - ANSIBLE_LIBRARY: "${PWD}/plugins" - ANSIBLE_MODULE_UTILS: "${PWD}/plugins/module_utils" + ${{ if not(parameters.test_galaxy) }}: + ANSIBLE_ROLES_PATH: "${PWD}/roles" + ANSIBLE_LIBRARY: "${PWD}/plugins" + ANSIBLE_MODULE_UTILS: "${PWD}/plugins/module_utils" IPA_SERVER_HOST: ansible-freeipa-tests RUN_TESTS_IN_DOCKER: podman IPA_DISABLED_MODULES: ${{ variables.ipa_disabled_modules }}