Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch Pulpcore testing to using puppet-pulpcore test suite #1729

Merged
merged 3 commits into from Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions pipelines/pulpcore/01-boxes.yml
Expand Up @@ -3,7 +3,6 @@
hosts: localhost
become: False
vars_files:
- ../vars/install_base.yml
- ../vars/forklift_{{ pipeline_type }}.yml
- ../vars/forklift_pulpcore.yml
roles:
- forklift
38 changes: 28 additions & 10 deletions pipelines/pulpcore/02-install.yml
Expand Up @@ -2,19 +2,17 @@
- name: Enable Postgresql 12 module if necessary
become: True
hosts:
- "{{ forklift_server_name }}"
- "{{ forklift_name }}"
vars_files:
- ../vars/install_base.yml
- ../vars/forklift_{{ pipeline_type }}.yml

- ../vars/forklift_pulpcore.yml
tasks:
- name: Enable postgresql 12 module
ansible.builtin.dnf:
name: '@postgresql:12'
state: present
when:
- pipeline_version is defined
- pipeline_version == 'nightly' or pipeline_version is version('3.28', '>=')
- pipeline_version != 'nightly' or pipeline_version is version('3.40', '<')
- pipeline_os is defined
- pipeline_os is search("centos8-stream")

Expand All @@ -24,17 +22,37 @@
become: True
vars_files:
- ../vars/install_base.yml
- ../vars/forklift_{{ pipeline_type }}.yml
- ../vars/forklift_pulpcore.yml
environment:
DJANGO_SETTINGS_MODULE: pulpcore.app.settings
pre_tasks:
- when: pipeline_version != 'nightly' and pipeline_version is version('3.28', '<=' )
- when: pipeline_version != 'nightly' and pipeline_version is version('3.28', '==' )
set_fact:
pulp_pkg_repo: "http://koji.katello.org/releases/yum/pulpcore-{{ pipeline_version }}/el{{ ansible_distribution_major_version }}/$basearch/"
- when: pipeline_version == 'nightly' or pipeline_version is version('3.39', '>=')
- when: pipeline_version != 'nightly' and pipeline_version is version('3.39', '==')
set_fact:
pulp_pkg_repo: "https://stagingyum.theforeman.org/pulpcore/{{ pipeline_version }}/el{{ ansible_distribution_major_version }}/$basearch/"
pulp_pkg_name_prefix: "python3.11-"
roles:
- epel_repositories
- pulp.pulp_installer.pulp_all_services
- role: epel_repositories
when:
- pipeline_version is defined
- pipeline_version != 'nightly' and pipeline_version is version('3.28', '==' )
- role: pulp.pulp_installer.pulp_all_services
when:
- pipeline_version is defined
- pipeline_version != 'nightly' or pipeline_version is version('3.39', '==')

- name: Setup git repo
become: True
hosts:
- "{{ forklift_name }}"
vars_files:
- ../vars/forklift_pulpcore.yml
vars:
beaker_puppet_module: "puppet-pulpcore"
roles:
- role: beaker
when:
- pipeline_version is defined
- pipeline_version == 'nightly' or pipeline_version is version('3.40', '>=')
30 changes: 26 additions & 4 deletions pipelines/pulpcore/03-tests.yml
@@ -1,10 +1,32 @@
---
- name: run tests
- name: run tests beaker
become: True
hosts:
- "{{ forklift_server_name }}"
- "{{ forklift_name }}"
vars_files:
- ../vars/forklift_pulpcore.yml
tasks:
- name: Run acceptance tests
ansible.builtin.include_role:
name: beaker
tasks_from: test
when:
- pipeline_version == 'nightly' or pipeline_version is version('3.40, '>=' )
vars:
beaker_puppet_module: "puppet-pulpcore"
beaker_os: "{{ pipeline_os.replace('-stream', '') }}"
beaker_environment:
BEAKER_FACTER_PULPCORE_BASEURL: "https://stagingyum.theforeman.org/pulpcore/{{ pipeline_version }}/el{{ ansible_distribution_major_version }}/x86_64"

- name: run tests ansible
become: True
hosts:
- "{{ forklift_name }}"
vars_files:
- ../vars/install_base.yml
- ../vars/forklift_{{ pipeline_type }}.yml
- ../vars/forklift_pulpcore.yml
roles:
- pulp.pulp_installer.pulp_health_check
- role: pulp.pulp_installer.pulp_health_check
when:
- pipeline_version is defined
- pipeline_version != 'nightly' or pipeline_version is version('3.39', '<=' )
4 changes: 3 additions & 1 deletion pipelines/vars/forklift_pulpcore.yml
@@ -1,9 +1,11 @@
forklift_name: "pipe-pulpcore-{{ pipeline_version }}-{{ pipeline_os }}"

server_box:
box: "{{ pipeline_server_os | default(pipeline_os) }}"
memory: 4680

forklift_boxes:
"{{ {forklift_server_name: server_box} }}"
"{{ {forklift_name: server_box} }}"

pulp_install_source: packages
pulp_pkg_repo_gpgcheck: False
Expand Down
22 changes: 4 additions & 18 deletions playbooks/setup_forklift.yml
Expand Up @@ -80,41 +80,27 @@
retries: 3
when: forklift_install_from_galaxy

- name: 'Install Forklift Pulp collection dependencies for <3.17'
- name: 'Install Forklift Pulp collection dependencies for 3.28'
command:
cmd: ansible-galaxy collection install -r requirements-pulp.yml
chdir: "{{ forklift_dest }}"
when:
- forklift_install_pulp_from_galaxy
- pipeline_version is defined
- pipeline_version != 'nightly'
- pipeline_version is version('3.17', '<=')
- pipeline_version is version('3.28', '==')
retries: 3
register: result
until: result is succeeded

- name: 'Install Forklift Pulp collection dependencies for >3.18'
command:
cmd: ansible-galaxy collection install -r requirements-pulp-322.yml
chdir: "{{ forklift_dest }}"
when:
- forklift_install_pulp_from_galaxy
- pipeline_version is defined
- pipeline_version != 'nightly'
- pipeline_version is version('3.18', '>=')
- pipeline_version is version('3.39', '<')
retries: 3
register: result
until: result is succeeded

- name: 'Install Forklift Pulp collection dependencies for >3.39'
- name: 'Install Forklift Pulp collection dependencies for 3.39'
command:
cmd: ansible-galaxy collection install -r requirements-pulp-339.yml
chdir: "{{ forklift_dest }}"
when:
- forklift_install_pulp_from_galaxy
- pipeline_version is defined
- pipeline_version == 'nightly' or pipeline_version is version('3.39', '>=')
- pipeline_version is version('3.39', '==')
retries: 3
register: result
until: result is succeeded
Expand Down
3 changes: 0 additions & 3 deletions requirements-pulp-322.yml

This file was deleted.

2 changes: 1 addition & 1 deletion requirements-pulp.yml
@@ -1,3 +1,3 @@
collections:
- name: pulp.pulp_installer
version: 3.15.9-4
version: 3.22.0