Skip to content

Commit

Permalink
Update pulpcore pipelines to use puppet-pulpcore on nightly
Browse files Browse the repository at this point in the history
  • Loading branch information
Odilhao committed Mar 15, 2024
1 parent c5e05e1 commit 9c3e413
Show file tree
Hide file tree
Showing 7 changed files with 67 additions and 27 deletions.
3 changes: 1 addition & 2 deletions pipelines/pulpcore/01-boxes.yml
Original file line number Diff line number Diff line change
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
42 changes: 34 additions & 8 deletions pipelines/pulpcore/02-install.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
---
- name: Setup git repo
- name: Enable Postgresql 12 module if necessary
become: True
hosts:
- "{{ forklift_name }}"
vars_files:
- ../vars/forklift_pulpcore.yml
tasks:
- name: Install podman-docker
package:
name: podman-docker
state: installed
- name: Enable postgresql 12 module
ansible.builtin.dnf:
name: '@postgresql:12'
state: present
when:
- pipeline_version is defined
- pipeline_version != 'nightly' and pipeline_version is version('3.28', '>=')
- pipeline_os is defined
- pipeline_os is search("centos8-stream")

- name: install pulpcore
hosts:
Expand All @@ -24,10 +29,31 @@
- 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:
- install_method is defined
- install_method == "puppet"
- pipeline_version == 'nightly' or pipeline_version is version('3.40, '>=' )
38 changes: 28 additions & 10 deletions pipelines/pulpcore/03-tests.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,36 @@
---
- name: run tests
- name: run tests beaker
become: True
hosts:
- "{{ forklift_name }}"
vars_files:
- ../vars/forklift_pulpcore.yml
tasks:
- name: Run acceptance tests
command: bundle exec rake beaker
args:
chdir: /src/puppet-pulpcore
environment:
BEAKER_HYPERVISOR: "docker"
BEAKER_provision: "yes"
BEAKER_setfile: "centos8-64{hostname=centos8-64.example.com}"
BEAKER_destroy: "no"
BEAKER_FACTER_PULPCORE_VERSION: "{{ pipeline_version }}"
ansible.builtin.include_role:
name: beaker
tasks_from: test
when:
- install_method is defined
- install_method == "puppet"
- pipeline_version == 'nightly' and 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
hosts:
- "{{ forklift_server_name }}"
become: True
hosts:

Check failure on line 27 in pipelines/pulpcore/03-tests.yml

View workflow job for this annotation

GitHub Actions / ansible-lint

yaml[key-duplicates]

Duplication of key "hosts" in mapping
- "{{ forklift_name }}"
vars_files:
- ../vars/install_base.yml
- ../vars/forklift_{{ pipeline_type }}.yml
roles:
- role: pulp.pulp_installer.pulp_health_check
when:
- pipeline_version is defined

Check failure on line 35 in pipelines/pulpcore/03-tests.yml

View workflow job for this annotation

GitHub Actions / ansible-lint

yaml[hyphens]

Too many spaces after hyphen
- pipeline_version != 'nightly' and pipeline_version is version('3.39', '<=' )

Check failure on line 36 in pipelines/pulpcore/03-tests.yml

View workflow job for this annotation

GitHub Actions / ansible-lint

yaml[hyphens]

Too many spaces after hyphen
2 changes: 1 addition & 1 deletion pipelines/vars/forklift_pulpcore.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
forklift_name: "pipe-pulp-{{ pipeline_version }}-{{ pipeline_os }}"
forklift_name: "pipe-pulpcore-{{ pipeline_version }}-{{ pipeline_os }}"

server_box:
box: "{{ pipeline_server_os | default(pipeline_os) }}"
Expand Down
4 changes: 2 additions & 2 deletions playbooks/setup_forklift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,13 @@

- name: 'Install Forklift Pulp collection dependencies for >3.18'
command:
cmd: ansible-galaxy collection install -r requirements-pulp-322.yml
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.18', '>=')
- pipeline_version is version('3.28', '>=')
- pipeline_version is version('3.39', '<')
retries: 3
register: result
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
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
collections:
- name: pulp.pulp_installer
version: 3.15.9-4
version: 3.22.0

0 comments on commit 9c3e413

Please sign in to comment.