Skip to content

Commit

Permalink
test e2e against puppet_extraction branch
Browse files Browse the repository at this point in the history
  • Loading branch information
kamils-iRonin committed Jul 19, 2021
1 parent 2fa29a6 commit 5b68d06
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,33 @@ jobs:
ports: ['5432:5432']
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
strategy:
fail-fast: true
fail-fast: false
max-parallel: 2
matrix:
foreman-core-branch: [2.5-stable, develop]
foreman-puppet-branch: [null, master]
foreman-core-branch: [2.5-stable, develop, puppet_extraction]
foreman-puppet-branch: [null, master, graphql_extensions]
ruby-version: [2.7]
node-version: [12.x]
exclude:
- foreman-core-branch: 2.5-stable
foreman-puppet-branch: master
- foreman-core-branch: puppet_extraction
foreman-puppet-branch: null
steps:
- name: Set PUPPET_EXTRACTED env
if: ${{ matrix.foreman-core-branch == 'puppet_extraction' }}
run: echo "PUPPET_EXTRACTED=1" >> $GITHUB_ENV
- uses: actions/checkout@v2
with:
path: lisa
- uses: actions/checkout@v2
with:
repository: theforeman/foreman
repository: kamils-iRonin/foreman
ref: ${{ matrix.foreman-core-branch }}
path: foreman
- uses: actions/checkout@v2
with:
repository: theforeman/foreman_puppet
repository: kamils-iRonin/foreman_puppet
ref: ${{ matrix.foreman-puppet-branch }}
path: foreman_puppet
if: ${{ matrix.foreman-puppet-branch != null }}
Expand Down
10 changes: 8 additions & 2 deletions e2e/foreman/db/seeds.d/200-lisa.rb
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
all_locations = Location.all
all_organizations = Organization.all

def puppet_class_importer
ForemanPuppet::PuppetClassImporter
rescue NameError
PuppetClassImporter
end

smart_proxy = SmartProxy.create!(
name: 'SmartProxyLisa',
url: 'http://localhost:8800',
locations: all_locations,
organizations: all_organizations
).tap do |smart_proxy|
PuppetClassImporter.new({ url: smart_proxy.url }).changes['new'].map do |key, value|
PuppetClassImporter.new.send(:add_classes_to_foreman, key, value)
puppet_class_importer.new({ url: smart_proxy.url }).changes['new'].map do |key, value|
puppet_class_importer.new.send(:add_classes_to_foreman, key, value)
end
end

Expand Down

0 comments on commit 5b68d06

Please sign in to comment.