forked from theforeman/forklift
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Candlepin pipeline to run puppet-candlepin tests
- Loading branch information
Showing
8 changed files
with
109 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
- import_playbook: candlepin/01-boxes.yml | ||
- import_playbook: candlepin/02-install.yml | ||
- import_playbook: candlepin/03-tests.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
- name: create vagrant boxes | ||
hosts: localhost | ||
become: False | ||
vars_files: | ||
- ../vars/forklift_candlepin.yml | ||
roles: | ||
- forklift |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
- name: Setup git repo | ||
become: True | ||
hosts: | ||
- "{{ forklift_name }}" | ||
vars_files: | ||
- ../vars/forklift_candlepin.yml | ||
vars: | ||
beaker_puppet_module: "puppet-candlepin" | ||
roles: | ||
- beaker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
- name: run tests | ||
become: True | ||
hosts: | ||
- "{{ forklift_name }}" | ||
vars_files: | ||
- ../vars/forklift_candlepin.yml | ||
tasks: | ||
- name: Run acceptance tests | ||
ansible.builtin.include_role: | ||
name: beaker | ||
tasks_from: test | ||
vars: | ||
beaker_puppet_module: "puppet-candlepin" | ||
beaker_os: "{{ pipeline_os.replace('-stream', '') }}" | ||
beaker_environment: | ||
BEAKER_FACTER_CANDLEPIN_BASEURL: "https://stagingyum.theforeman.org/candlepin/{{ pipeline_version }}/el{{ ansible_distribution_major_version }}/x86_64" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
forklift_name: "pipe-candlepin-{{ pipeline_version }}-{{ pipeline_os }}" | ||
|
||
server_box: | ||
box: "{{ pipeline_os }}" | ||
memory: 4680 | ||
|
||
forklift_boxes: | ||
"{{ {forklift_name: server_box} }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
beaker_base_environment: | ||
BEAKER_HYPERVISOR: "docker" | ||
BEAKER_provision: "yes" | ||
BEAKER_setfile: "{{ beaker_os }}-64{hostname={{ beaker_os }}-64.example.com}" | ||
BEAKER_destroy: "no" | ||
beaker_environment: {} | ||
beaker_puppet_module_path: "/src/{{ beaker_puppet_module }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--- | ||
- name: Install podman-docker | ||
package: | ||
name: podman-docker | ||
state: installed | ||
|
||
- 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: enable CRB | ||
command: dnf config-manager --set-enabled crb | ||
when: ansible_distribution_major_version == "9" | ||
|
||
- name: Install Ruby | ||
package: | ||
state: installed | ||
name: | ||
- ruby | ||
- ruby-devel | ||
- rubygem-bundler | ||
- gcc-c++ | ||
- make | ||
- redhat-rpm-config | ||
- libyaml-devel | ||
|
||
- name: Clone puppet module | ||
ansible.builtin.git: | ||
repo: "https://github.com/theforeman/{{ beaker_puppet_module }}.git" | ||
dest: "{{ beaker_puppet_module_path }}" | ||
version: "{{ beaker_puppet_module_version | default(omit) }}" | ||
|
||
- name: Bundle install | ||
command: bundle install | ||
args: | ||
chdir: "{{ beaker_puppet_module_path }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
- name: Run acceptance tests | ||
command: bundle exec rake beaker | ||
args: | ||
chdir: "{{ beaker_puppet_module_path }}" | ||
environment: "{{ beaker_base_environment | ansible.builtin.combine(beaker_environment) }}" |