Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Damien Duportal <damien.duportal@gmail.com>
  • Loading branch information
dduportal committed Jul 10, 2022
1 parent 5183bef commit 4feb42b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
16 changes: 8 additions & 8 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@ end

PuppetLint::RakeTask.new :lint do |config|
config.disable_checks = ['80chars',
'class_parameter_defaults',
'names_containing_dash']
'class_parameter_defaults',
'names_containing_dash']
config.pattern = 'dist/**/*.pp'
config.fail_on_warnings = true
end

desc 'Resolve all the dependencies'
task :resolve do
# for reasons beyond me, we list dependencies in Puppetfile and .fixtures.yml
# we need to keep them in sync, and when we change them we need to run two commands
# to reflect those changes
# Cleanup
`rm -rf ./modules/ .fixtures.yml`

# this fills ./modules
`rm -rf ./modules/*`
`r10k puppetfile install`
# Generate the test fixtures from the Puppetfile and install them in ./spec/fixtures/ (modules, symlinks, etc.)
`generate-puppetfile -p ./Puppetfile --fixtures-only --ignore-comments`
# Remove jenkins_keys as it is a private repository
`yq --inplace 'del(.fixtures.repositories.jenkins_keys)' .fixtures.yml # Remove jenkins_keys as it is a private repository`

# this fills ./spec/fixtures/modules
Rake::Task['spec_clean'].invoke
Expand Down
8 changes: 2 additions & 6 deletions ci/00_setupgems.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,5 @@ bundle -v
mkdir -p vendor/gems
bundle install --without development plugins --path=vendor/gems

# Generate fixtures for unit tests from the Puppetfile (production Puppet modules)
bundle exec generate-puppetfile -p ./Puppetfile --fixtures-only --ignore-comments
yq --inplace 'del(.fixtures.repositories.jenkins_keys)' .fixtures.yml # Remove jenkins_keys as it is a private repository

# Generate Test Fixtures
bundle exec rake spec_clean spec_prep
# Resolve Test Fixtures and Puppet modules
bundle exec rake resolve

0 comments on commit 4feb42b

Please sign in to comment.