Skip to content

Commit

Permalink
move test execution into the beaker role
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeni committed Nov 30, 2023
1 parent 51c235f commit b474f22
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
15 changes: 6 additions & 9 deletions pipelines/candlepin/03-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,11 @@
- ../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: "{{ beaker_os }}-64{hostname={{ beaker_os }}-64.example.com}"
BEAKER_destroy: "no"
BEAKER_FACTER_CANDLEPIN_VERSION: "{{ pipeline_version }}"
ansible.builtin.include_role:
name: beaker
tasks_from: test
vars:
beaker_puppet_module: "puppet-candlepin"
beaker_os: "{{ pipeline_os | regex_replace('-stream', '') }}"
beaker_environment:
BEAKER_FACTER_CANDLEPIN_VERSION: "{{ pipeline_version }}"
6 changes: 6 additions & 0 deletions roles/beaker/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
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: {}
5 changes: 5 additions & 0 deletions roles/beaker/tasks/test.yml
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: "/src/{{ beaker_puppet_module }}"
environment: "{{ beaker_base_environment | ansible.builtin.combine(beaker_environment) }}"

0 comments on commit b474f22

Please sign in to comment.