mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-06-11 19:25:54 +00:00
upstream CI: Simplify pipelines enviroment creation
Several optimizations have been done to the pipelines, to make them closer to what can be reproduced, with the existing scripts, in a development environment: - Use start.sh and build.sh scripts to build and start containers - Use variables to configure different stages instead of using separate files - Use a commom 'prepare_environment' to create the environment for every pipeline - Use a single file defining testing steps (run_tests.yml) - Remove Centos 7 pipelines - Reduce the number of pipelines in the test matrix due to the amount of time that tests were using - Use Azure "loop" (each) to create test groups The above changes make the pipelines easier to understand and modify.
This commit is contained in:
30
infra/azure/templates/prepare_environment.yaml
Normal file
30
infra/azure/templates/prepare_environment.yaml
Normal file
@@ -0,0 +1,30 @@
|
||||
---
|
||||
parameters:
|
||||
- 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
|
||||
|
||||
steps:
|
||||
- task: UsePythonVersion@0
|
||||
inputs:
|
||||
versionSpec: '${{ parameters.python_version }}'
|
||||
|
||||
- script: |
|
||||
pip install "ansible${{ parameters.ansible_version }}" -r requirements-tests.txt
|
||||
retryCountOnTaskFailure: 5
|
||||
displayName: Install test dependencies
|
||||
|
||||
- script: ansible-galaxy collection install -r requirements-podman.yml
|
||||
retryCountOnTaskFailure: 5
|
||||
displayName: Install Ansible collections
|
||||
|
||||
- script: infra/image/start.sh ${{ parameters.distro }}-server
|
||||
displayName: Setup target container for ${{ parameters.distro }}
|
||||
Reference in New Issue
Block a user