Skip to content

Commit

Permalink
Switch Pulpcore testing to using puppet-pulpcore test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
ehelms committed Nov 15, 2023
1 parent a3ffa3e commit ee6d083
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 41 deletions.
80 changes: 46 additions & 34 deletions pipelines/pulpcore/02-install.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,52 @@
---
- name: Enable Postgresql 12 module if necessary
- name: Setup git repo
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_os is defined
- pipeline_os is search("centos8-stream")
- name: Install podman-docker
package:
name: podman-docker
state: installed

- name: install pulpcore
hosts:
- "{{ forklift_server_name }}"
become: True
vars_files:
- ../vars/install_base.yml
- ../vars/forklift_{{ pipeline_type }}.yml
environment:
DJANGO_SETTINGS_MODULE: pulpcore.app.settings
pre_tasks:
- when: pipeline_version != 'nightly'
set_fact:
pulp_pkg_repo: "http://koji.katello.org/releases/yum/pulpcore-{{ pipeline_version }}/el{{ ansible_distribution_major_version }}/$basearch/"
- when: pipeline_version == 'nightly'
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
- name: Start podman
service:
name: podman
state: started

- name: Install git
package:
name: git
state: installed

- name: Enable ruby 2.7 module
command: dnf module enable -y ruby:2.7
when: ansible_distribution_major_version == "8"

- name: enable powertools
command: dnf config-manager --set-enabled powertools
when: ansible_distribution_major_version == "8"

- name: Install Ruby
package:
name:
- ruby
- ruby-devel
- rubygem-bundler
- gcc-c++
- make
- redhat-rpm-config
- libyaml-devel
state: installed

- name: Clone puppet-pulpcore
ansible.builtin.git:
repo: https://github.com/theforeman/puppet-pulpcore.git
dest: /src/puppet-pulpcore

- name: Bundle install
command: bundle install
args:
chdir: /src/puppet-pulpcore
20 changes: 14 additions & 6 deletions pipelines/pulpcore/03-tests.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
---
- name: run tests
hosts:
- "{{ forklift_server_name }}"
become: True
hosts:
- "{{ forklift_name }}"
vars_files:
- ../vars/install_base.yml
- ../vars/forklift_{{ pipeline_type }}.yml
roles:
- pulp.pulp_installer.pulp_health_check
- ../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 }}"
4 changes: 3 additions & 1 deletion pipelines/vars/forklift_pulpcore.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
forklift_name: "pipe-pulp-{{ pipeline_version }}-{{ pipeline_os }}"

server_box:
box: "{{ 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

0 comments on commit ee6d083

Please sign in to comment.