mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-06-10 02:35:54 +00:00
All scripts related to the Azure CI now reside on inrfa/azure, but the scripts that evaluate the changes made against ansible-freeipa's main development branch. This patch move these scripts to the proper locations.
99 lines
3.1 KiB
YAML
99 lines
3.1 KiB
YAML
---
|
|
parameters:
|
|
- name: group_number
|
|
type: number
|
|
default: 1
|
|
- name: number_of_groups
|
|
type: number
|
|
default: 1
|
|
- name: distro
|
|
type: string
|
|
default: fedora-latest
|
|
- name: ansible_version
|
|
type: string
|
|
default: ""
|
|
- name: python_version
|
|
type: string
|
|
default: 3.x
|
|
- name: build_number
|
|
type: string
|
|
- name: skip_git_test
|
|
type: boolean
|
|
default: true
|
|
- name: test_type
|
|
type: string
|
|
default: "playbook"
|
|
- name: test_galaxy
|
|
type: boolean
|
|
default: false
|
|
|
|
jobs:
|
|
- job: Test_Group${{ parameters.group_number }}
|
|
displayName: Run playbook tests ${{ parameters.distro }} (${{ parameters.group_number }}/${{ parameters.number_of_groups }})
|
|
timeoutInMinutes: 360
|
|
variables:
|
|
- template: variables.yaml
|
|
- template: variables_${{ parameters.distro }}.yaml
|
|
steps:
|
|
- template: prepare_environment.yaml
|
|
parameters:
|
|
build_number: ${{ parameters.build_number }}
|
|
distro: ${{ parameters.distro }}
|
|
ansible_version: ${{ parameters.ansible_version }}
|
|
python_version: ${{ parameters.python_version }}
|
|
|
|
- bash: echo "##vso[task.setvariable variable=TOPDIR]${PWD}"
|
|
displayName: Set repo rootdir
|
|
|
|
- script: |
|
|
. "${TOPDIR}/infra/azure/scripts/set_test_modules"
|
|
python3 utils/check_test_configuration.py ${{ parameters.distro }}
|
|
displayName: Check test configuration
|
|
env:
|
|
SKIP_GIT_TEST: ${{ parameters.skip_git_test }}
|
|
|
|
- script: |
|
|
git fetch --unshallow
|
|
utils/build-galaxy-release.sh -i
|
|
retryCountOnTaskFailure: 5
|
|
displayName: Build Galaxy release
|
|
condition: ${{ parameters.test_galaxy }}
|
|
|
|
- script: |
|
|
echo "PWD: ${PWD}"
|
|
echo "TOPDIR: ${TOPDIR}"
|
|
echo "ROLES: ${ANSIBLE_ROLES_PATH}"
|
|
echo "LIBRARY: ${ANSIBLE_LIBRARY}"
|
|
echo "MODULE_UTILS: ${ANSIBLE_MODULE_UTILS}"
|
|
. "${TOPDIR}/infra/azure/scripts/set_test_modules"
|
|
[ "${{ parameters.test_galaxy }}" == "True" ] && cd ~/.ansible/collections/ansible_collections/freeipa/ansible_freeipa
|
|
pytest \
|
|
-m "${{ parameters.test_type }}" \
|
|
--verbose \
|
|
--color=yes \
|
|
--splits=${{ parameters.number_of_groups }} \
|
|
--group=${{ parameters.group_number }} \
|
|
--randomly-seed=$(date "+%Y%m%d") \
|
|
--suppress-no-test-exit-code \
|
|
--junit-xml=TEST-results-pr-check.xml
|
|
displayName: Run playbook tests
|
|
env:
|
|
SKIP_GIT_TEST: ${{ parameters.skip_git_test }}
|
|
${{ 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 }}
|
|
IPA_DISABLED_TESTS: ${{ variables.ipa_disabled_tests }}
|
|
IPA_ENABLED_MODULES: ${{ variables.ipa_enabled_modules }}
|
|
IPA_ENABLED_TESTS: ${{ variables.ipa_enabled_tests }}
|
|
IPA_VERBOSITY: "-vvv"
|
|
|
|
- task: PublishTestResults@2
|
|
inputs:
|
|
mergeTestResults: true
|
|
testRunTitle: PlaybookTests-Build${{ parameters.build_number }}
|
|
condition: succeededOrFailed()
|