Skip to content

Commit

Permalink
test reorg
Browse files Browse the repository at this point in the history
  • Loading branch information
rjeffman committed Feb 12, 2025
1 parent daf3fe3 commit f7f0aa2
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 28 deletions.
23 changes: 21 additions & 2 deletions infra/azure/templates/prepare_environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,24 @@ steps:
retryCountOnTaskFailure: 5
displayName: Install Ansible collections

# - script: infra/image/start.sh ${{ parameters.distro }}-server
# displayName: Setup target container for ${{ parameters.distro }}
# Deployment of IPA servers/clients is done through the collection
- script: |
git fetch --unshallow
utils/build-galaxy-release.sh -i
retryCountOnTaskFailure: 5
displayName: Build Galaxy release - Temp
- script: cat infra/scenarios/ipa-ad-trust.yml
displayName: Show configuration - Debug

- script: |
infra/scenarios/start-scenario -D infra/scenarios/ipa-ad-trust.yml
# workaround for 'sudo'
podman exec addc chmod u+r /etc/shadow
podman exec server chmod u+r /etc/shadow
podman exec cli01 chmod u+r /etc/shadow
# Deploy nodes
ansible-playbook -i ansible-freeipa-scenario/inventory.yml ansible-freeipa-scenario/playbooks/deploy_*.yml ||:
ansible-playbook -i ansible-freeipa-scenario/inventory.yml ansible-freeipa-scenario/playbooks/install-cluster.yml || exit 1
ansible-playbook -i ansible-freeipa-scenario/inventory.yml ansible-freeipa-scenario/playbooks/config_*.yml ||:
displayName: Prepare testing scenario
30 changes: 4 additions & 26 deletions infra/azure/templates/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,41 +53,19 @@ jobs:
env:
SKIP_GIT_TEST: ${{ parameters.skip_git_test }}
# Deployment of IPA servers/clients is done through the collection
- script: |
git fetch --unshallow
utils/build-galaxy-release.sh -i
retryCountOnTaskFailure: 5
displayName: Build Galaxy release
- script: cat infra/scenarios/ipa-ad-trust.yml
displayName: Debug - Show configuration

- script: |
# [ "${{ parameters.test_galaxy }}" == "True" ] && cd ~/.ansible/collections/ansible_collections/freeipa/ansible_freeipa
#
infra/scenarios/start-scenario -D infra/scenarios/ipa-ad-trust.yml
# Give a chance for containers to be up
sleep 5
# workaround for 'sudo'
podman exec addc chmod u+r /etc/shadow
podman exec server chmod u+r /etc/shadow
podman exec cli01 chmod u+r /etc/shadow
# Deploy nodes
ansible-playbook -i ansible-freeipa-scenario/inventory.yml ansible-freeipa-scenario/playbooks/deploy_*.yml ||:
ansible-playbook -i ansible-freeipa-scenario/inventory.yml ansible-freeipa-scenario/playbooks/install-cluster.yml || exit 1
ansible-playbook -i ansible-freeipa-scenario/inventory.yml ansible-freeipa-scenario/playbooks/config_*.yml ||:
# Run tests
infra/scenarios/run_test_scenario.sh -k
infra/scenarios/run_test_scenario.sh -k -vvv
displayName: Run playbook tests
env:
SKIP_GIT_TEST: ${{ parameters.skip_git_test }}
${{ if not(parameters.test_galaxy) }}:
${{ if not(parameters.test_galaxy) }}:
ANSIBLE_ROLES_PATH: "${PWD}/roles"
ANSIBLE_LIBRARY: "${PWD}/plugins"
ANSIBLE_MODULE_UTILS: "${PWD}/plugins/module_utils"
${{ if (parameters.test_galaxy) }}:
ANSIBLE_COLLECTIONS_PATH="${HOME}/.ansible/collections/ansible_collections"
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"
3 changes: 3 additions & 0 deletions infra/scenarios/run_test_scenario.sh
Original file line number Diff line number Diff line change
Expand Up @@ -173,3 +173,6 @@ then
echo "Shutting down environment"
infra/scenarios/stop-scenario
fi

# Return error code
[ "${error:-"NO"}" == "YES" ]

0 comments on commit f7f0aa2

Please sign in to comment.