-
Notifications
You must be signed in to change notification settings - Fork 200
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
6 changed files
with
87 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,18 @@ | ||
--- | ||
- name: run tests | ||
become: True | ||
hosts: | ||
- "{{ forklift_name }}" | ||
vars_files: | ||
- ../vars/forklift_candlepin.yml | ||
tasks: | ||
- name: Run acceptance tests | ||
command: bundle exec rake beaker | ||
args: | ||
chdir: /src/puppet-candlepin | ||
environment: | ||
BEAKER_HYPERVISOR: "docker" | ||
BEAKER_provision: "yes" | ||
BEAKER_setfile: "centos8-64{hostname=centos8-64.example.com}" | ||
BEAKER_destroy: "no" | ||
BEAKER_FACTER_CANDLEPIN_VERSION: "{{ pipeline_version }}" |
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,39 @@ | ||
--- | ||
- 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 | ||
|
||
- name: Install Ruby | ||
package: | ||
state: installed | ||
name: | ||
- ruby | ||
- ruby-devel | ||
- rubygem-bundler | ||
- gcc-c++ | ||
- make | ||
- redhat-rpm-config | ||
|
||
- name: Clone puppet module | ||
ansible.builtin.git: | ||
repo: "https://github.com/theforeman/{{ beaker_puppet_module }}.git" | ||
dest: "/src/{{ beaker_puppet_module }}" | ||
|
||
- name: Bundle install | ||
command: bundle install | ||
args: | ||
chdir: "/src/{{ beaker_puppet_module }}" |