Skip to content

Commit

Permalink
Merge pull request freeipa#1300 from rjeffman/update_upstream_ci
Browse files Browse the repository at this point in the history
Fix upstream CI and remove molecule
  • Loading branch information
t-woerner authored Oct 31, 2024
2 parents bdcc815 + 0f530df commit 33c1c00
Show file tree
Hide file tree
Showing 51 changed files with 421 additions and 1,323 deletions.
1 change: 0 additions & 1 deletion .ansible-lint
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ exclude_paths:
- .tox/
- .venv/
- .yamllint
- molecule/
- tests/azure/
- meta/runtime.yml
- requirements-docker.yml
Expand Down
42 changes: 19 additions & 23 deletions tests/azure/azure-pipelines.yml → infra/azure/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ stages:
- template: templates/group_tests.yml
parameters:
build_number: $(Build.BuildNumber)
scenario: fedora-latest
distro: fedora-latest
ansible_version: "-core"
skip_git_test: true

# Fedora

Expand All @@ -26,8 +27,9 @@ stages:
- template: templates/group_tests.yml
parameters:
build_number: $(Build.BuildNumber)
scenario: fedora-latest
ansible_version: "-core <2.14"
distro: fedora-latest
ansible_version: "-core <2.16"
skip_git_test: true

# Fedora

Expand All @@ -37,19 +39,22 @@ stages:
- template: templates/group_tests.yml
parameters:
build_number: $(Build.BuildNumber)
scenario: fedora-latest
ansible_version: "-core >=2.14,<2.15"
distro: fedora-latest
skip_git_test: true
ansible_version: "-core >=2.16,<2.17"

# Galaxy on Fedora

- stage: Galaxy_Fedora_Latest
dependsOn: []
jobs:
- template: templates/galaxy_tests.yml
- template: templates/group_tests.yml
parameters:
build_number: $(Build.BuildNumber)
scenario: fedora-latest
ansible_version: "-core >=2.14,<2.15"
distro: fedora-latest
ansible_version: "-core >=2.16,<2.17"
skip_git_test: true
test_galaxy: true

# CentOS 9 Stream

Expand All @@ -59,8 +64,9 @@ stages:
- template: templates/group_tests.yml
parameters:
build_number: $(Build.BuildNumber)
scenario: c9s
ansible_version: "-core >=2.14,<2.15"
distro: c9s
ansible_version: "-core >=2.16,<2.17"
skip_git_test: true

# CentOS 8 Stream

Expand All @@ -70,16 +76,6 @@ stages:
- template: templates/group_tests.yml
parameters:
build_number: $(Build.BuildNumber)
scenario: c8s
ansible_version: "-core >=2.14,<2.15"

# CentOS 7

- stage: CentOS_7
dependsOn: []
jobs:
- template: templates/group_tests.yml
parameters:
build_number: $(Build.BuildNumber)
scenario: centos-7
ansible_version: "-core >=2.14,<2.15"
distro: c8s
ansible_version: "-core <2.17"
skip_git_test: true
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,10 @@ schedules:
trigger: none

pool:
vmImage: 'ubuntu-22.04'
vmImage: 'ubuntu-24.04'

stages:

# Currently, it's not possible to use CentOS container
#
# - stage: CentOS_7
# dependsOn: []
# jobs:
# - template: templates/build_container.yml
# parameters:
# job_name_suffix: Centos7
# distro: centos-7

- stage: CentOS_8_Stream
dependsOn: []
jobs:
Expand All @@ -43,6 +33,14 @@ stages:
job_name_suffix: C9S
distro: c9s

- stage: CentOS_10_Stream
dependsOn: []
jobs:
- template: templates/build_container.yml
parameters:
job_name_suffix: C10S
distro: c10s

- stage: Fedora_Latest
dependsOn: []
jobs:
Expand Down
126 changes: 126 additions & 0 deletions infra/azure/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
---
schedules:
- cron: "0 19 * * *"
displayName: Nightly Builds
branches:
include:
- master
always: true

trigger: none

pool:
vmImage: 'ubuntu-20.04'

stages:

# Fedora

- stage: fedora_latest_Ansible_Core_2_15
dependsOn: []
jobs:
- template: templates/group_tests.yml
parameters:
build_number: $(Build.BuildNumber)
distro: fedora-latest
ansible_version: "-core >=2.15,<2.16"
skip_git_test: true

- stage: fedora_latest_Ansible_Core_2_16
dependsOn: []
jobs:
- template: templates/group_tests.yml
parameters:
build_number: $(Build.BuildNumber)
distro: fedora-latest
ansible_version: ""
skip_git_test: true

- stage: fedora_latest_Ansible_Core_2_17
dependsOn: []
jobs:
- template: templates/group_tests.yml
parameters:
build_number: $(Build.BuildNumber)
distro: fedora-latest
ansible_version: "-core >=2.17"
skip_git_test: true

# Galaxy on Fedora

- stage: Galaxy_fedora_latest_Ansible_Core_2_17
dependsOn: []
jobs:
- template: templates/group_tests.yml
parameters:
build_number: $(Build.BuildNumber)
distro: fedora-latest
ansible_version: "-core >=2.17,<2.18"
skip_git_test: true
test_galaxy: true

# Fedora Rawhide

- stage: fedora_rawhide_Ansible_Core_2_17
dependsOn: []
jobs:
- template: templates/group_tests.yml
parameters:
build_number: $(Build.BuildNumber)
distro: fedora-rawhide
ansible_version: "-core >=2.17,<2.18"
skip_git_test: true

# CentoOS 9 Stream

- stage: c9s_Ansible_Core_2_15
dependsOn: []
jobs:
- template: templates/group_tests.yml
parameters:
build_number: $(Build.BuildNumber)
distro: c9s
ansible_version: "-core >=2.15,<2.16"
skip_git_test: true

- stage: c9s_Ansible_Core_2_16
dependsOn: []
jobs:
- template: templates/group_tests.yml
parameters:
build_number: $(Build.BuildNumber)
distro: c9s
ansible_version: "-core >=2.16,<2.17"
skip_git_test: true

- stage: c9s_Ansible_Core_2_17
dependsOn: []
jobs:
- template: templates/group_tests.yml
parameters:
build_number: $(Build.BuildNumber)
distro: c9s
ansible_version: "-core >=2.17,<2.18"
skip_git_test: true

# CentOS 8 Stream only works up to ansible-core 2.16.z

- stage: c8s_Ansible_Core_2_15
dependsOn: []
jobs:
- template: templates/group_tests.yml
parameters:
build_number: $(Build.BuildNumber)
distro: c8s
ansible_version: "-core >=2.15,<2.16"
skip_git_test: true

- stage: c8s_Ansible_Core_2_16
dependsOn: []
jobs:
- template: templates/group_tests.yml
parameters:
build_number: $(Build.BuildNumber)
distro: c8s
ansible_version: "-core >=2.16,<2.17"
skip_git_test: true
31 changes: 11 additions & 20 deletions tests/azure/pr-pipeline.yml → infra/azure/pr-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,67 +12,58 @@ stages:
- stage: Fedora_Latest
dependsOn: []
jobs:
- template: templates/fast_tests.yml
- template: templates/run_tests.yml
parameters:
build_number: $(Build.BuildNumber)
distro: fedora-latest
ansible_version: "-core >=2.15,<2.16"
skip_git_test: false

# Galaxy on Fedora

- stage: Galaxy_Fedora_Latest
dependsOn: []
jobs:
- template: templates/fast_tests.yml
- template: templates/run_tests.yml
parameters:
build_number: $(Build.BuildNumber)
distro: fedora-latest
ansible_version: "-core >=2.15,<2.16"
skip_git_test: false
test_galaxy: true

# CentOS 9 Stream

- stage: CentOS_9_Stream
dependsOn: []
jobs:
- template: templates/fast_tests.yml
- template: templates/run_tests.yml
parameters:
build_number: $(Build.BuildNumber)
distro: c9s
ansible_version: "-core >=2.15,<2.16"
skip_git_test: false

# CentOS 8 Stream

- stage: CentOS_8_Stream
dependsOn: []
jobs:
- template: templates/fast_tests.yml
- template: templates/run_tests.yml
parameters:
build_number: $(Build.BuildNumber)
distro: c8s
ansible_version: "-core >=2.15,<2.16"
target_python: "/usr/libexec/platform-python"

# CentOS 7 cannot be used with current systemd
#
# CentOS 7
#
# - stage: CentOS_7
# dependsOn: []
# jobs:
# - template: templates/fast_tests.yml
# parameters:
# build_number: $(Build.BuildNumber)
# distro: centos-7
# ansible_version: "-core >=2.15,<2.16"
# target_python: "/usr/bin/python2"
skip_git_test: false

# Rawhide

- stage: Fedora_Rawhide
dependsOn: []
jobs:
- template: templates/fast_tests.yml
- template: templates/run_tests.yml
parameters:
build_number: $(Build.BuildNumber)
distro: fedora-rawhide
ansible_version: "-core >=2.15,<2.16"
skip_git_test: false
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,15 @@ jobs:
retryCountOnTaskFailure: 5
displayName: Install tools

- script: |
rm -rf ~/.ansible
mkdir -p ~/.ansible
ln -snf $(readlink -f roles) ~/.ansible/roles
ln -snf $(readlink -f plugins) ~/.ansible/plugins
displayName: Setup ansible-freeipa using Git repository
- script: ansible-galaxy collection install containers.podman
displayName: Install Ansible Galaxy collections

- script: infra/image/build.sh -s ${{ parameters.distro }}
displayName: Build ${{ parameters.distro }} base image
env:
ANSIBLE_ROLES_PATH: "${PWD}/roles"
ANSIBLE_LIBRARY: "${PWD}/plugins/modules"
ANSIBLE_MODULE_UTILS: "${PWD}/plugins/module_utils"

- script: podman login -u="$QUAY_ROBOT_USERNAME" -p="$QUAY_ROBOT_TOKEN" quay.io
displayName: Registry login
Expand Down
30 changes: 30 additions & 0 deletions infra/azure/templates/group_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
parameters:
- name: distro
type: string
default: fedora-latest
- name: build_number
type: string
- name: ansible_version
type: string
default: ""
- name: skip_git_test
type: boolean
default: false
- name: test_galaxy
type: boolean
default: false

jobs:

- ${{ 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 }}
Loading

0 comments on commit 33c1c00

Please sign in to comment.