Skip to content

Commit

Permalink
Convert to PDK (#254)
Browse files Browse the repository at this point in the history
* Convert to PDK

* rubocop autocorrect

* Rubocopy fixes

* rubocop

* Add augeas addon to .travis.yml

* Add deploy section to .travis.yml

* Remove spec/spec.opts

* Add augeas_core for Puppet 6

* Fix augeasprovider loading for Puppet 6

* Use litmus instead of beaker

* Fix litmus centos6 image

* Add ldapsearch function spec_helper_acceptance

* Rubocop lint

* Use idempotent_apply()

* Deactivate shell() in ldapsearch()

* Fix tmpdir creation

* Deactivate rubucop for now

* Replace on hosts with run_shell()

* Convert certs in spec_helper_acceptance_local.rb

* scp_to() => pending

* Generate certificate

* Use File.read instead of scp_to

* Add iproute2 on debian-based OSes to have ss in tests

* Use serverspec function in litmus
  • Loading branch information
raphink authored Jan 27, 2020
1 parent 98ea96c commit cb93487
Show file tree
Hide file tree
Showing 50 changed files with 1,978 additions and 827 deletions.
6 changes: 6 additions & 0 deletions .fixtures.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
fixtures:
forge_modules:
augeas_core: 'puppetlabs/augeas_core'
augeasproviders_core: 'herculesteam/augeasproviders_core'
augeasproviders_shellvar: 'herculesteam/augeasproviders_shellvar'
stdlib: 'puppetlabs/stdlib'
repositories:
# litmus dependencies
facts: 'git://github.com/puppetlabs/puppetlabs-facts.git'
puppet_agent: 'git://github.com/puppetlabs/puppetlabs-puppet_agent.git'
provision: 'git://github.com/puppetlabs/provision.git'
symlinks:
openldap: "#{source_dir}"
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*.rb eol=lf
*.erb eol=lf
*.pp eol=lf
*.sh eol=lf
*.epp eol=lf
37 changes: 27 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,27 @@
pkg/
Gemfile.lock
vendor/
spec/fixtures/
.vagrant/
.bundle/
coverage/
log/
.*.swp
*~
.git/
.*.sw[op]
.metadata
.yardoc
.yardwarns
*.iml
/.bundle/
/.idea/
/.vagrant/
/coverage/
/bin/
/doc/
/Gemfile.local
/Gemfile.lock
/junit/
/log/
/pkg/
/spec/fixtures/manifests/
/spec/fixtures/modules/
/tmp/
/vendor/
/convert_report.txt
/update_report.txt
.DS_Store
.project
.envrc
/inventory.yaml
41 changes: 41 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
stages:
- syntax
- unit

cache:
paths:
- vendor/bundle

before_script:
- bundle -v
- rm Gemfile.lock || true
- gem update --system $RUBYGEMS_VERSION
- gem --version
- bundle -v
- bundle install --without system_tests --path vendor/bundle --jobs $(nproc)

syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop-Ruby 2.5.3-Puppet ~> 6:
stage: syntax
image: ruby:2.5.3
script:
- bundle exec rake syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop
variables:
PUPPET_GEM_VERSION: '~> 6'

parallel_spec-Ruby 2.5.3-Puppet ~> 6:
stage: unit
image: ruby:2.5.3
script:
- bundle exec rake parallel_spec
variables:
PUPPET_GEM_VERSION: '~> 6'

parallel_spec-Ruby 2.4.5-Puppet ~> 5:
stage: unit
image: ruby:2.4.5
script:
- bundle exec rake parallel_spec
variables:
PUPPET_GEM_VERSION: '~> 5'

42 changes: 42 additions & 0 deletions .pdkignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
.git/
.*.sw[op]
.metadata
.yardoc
.yardwarns
*.iml
/.bundle/
/.idea/
/.vagrant/
/coverage/
/bin/
/doc/
/Gemfile.local
/Gemfile.lock
/junit/
/log/
/pkg/
/spec/fixtures/manifests/
/spec/fixtures/modules/
/tmp/
/vendor/
/convert_report.txt
/update_report.txt
.DS_Store
.project
.envrc
/inventory.yaml
/appveyor.yml
/.fixtures.yml
/Gemfile
/.gitattributes
/.gitignore
/.gitlab-ci.yml
/.pdkignore
/Rakefile
/rakelib/
/.rspec
/.rubocop.yml
/.travis.yml
/.yardopts
/spec/
/.vscode/
4 changes: 0 additions & 4 deletions .puppet-lint.rc
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
--fail-on-warnings
--relative
--no-140chars
--no-documentation
--no-class_inherits_from_params_class-check
2 changes: 2 additions & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--color
--format documentation
Loading

0 comments on commit cb93487

Please sign in to comment.