Skip to content

Commit

Permalink
Pin concat to 4.1.1 (#51)
Browse files Browse the repository at this point in the history
* pinned concat to 4.1.1

* allow failure on puppet 5 in travis

* fix haveged URL in fixtures

* add range for simp-rake-helpers

* allow Puppet 5 tests to fail
  • Loading branch information
Nick Miller authored and jeannegreulich committed Feb 12, 2018
1 parent a57ce2f commit aa7aaa6
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 70 deletions.
10 changes: 6 additions & 4 deletions .fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ fixtures:
auditd: https://github.com/simp/pupmod-simp-auditd
augeasproviders_core: https://github.com/simp/augeasproviders_core
augeasproviders_grub: https://github.com/simp/augeasproviders_grub
concat: https://github.com/simp/puppetlabs-concat
haveged:
repo: https://github.com/simp/puppet-haveged
branch: simp-master
concat:
# master is beyond 4.1.1, but has breaking changes to
# how fragments are ordered (MODULES-6625)
repo: https://github.com/simp/puppetlabs-concat
ref: 4.1.1
haveged: https://github.com/simp/pupmod-simp-haveged
iptables: https://github.com/simp/pupmod-simp-iptables
logrotate: https://github.com/simp/pupmod-simp-logrotate
pki: https://github.com/simp/pupmod-simp-pki
Expand Down
96 changes: 34 additions & 62 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,102 +2,59 @@
.cache_bundler: &cache_bundler
cache:
untracked: true
key: "$CI_BUILD_REF_NAME"
# An attempt at caching between runs (ala Travis CI)
key: "${CI_PROJECT_NAMESPACE}__bundler"
paths:
- '.vendor'
- 'vendor'

.setup_bundler_env: &setup_bundler_env
before_script:
- gem install bundler
- rm -f Gemfile.lock
- bundle install --no-binstubs --path .vendor "${FLAGS[@]}"
- '(find .vendor | wc -l) || :'
- bundle || gem install bundler --no-rdoc --no-ri
- rm -rf Gemfile.lock pkg/
- bundle install --no-binstubs --jobs $(nproc) --path .vendor "${FLAGS[@]}"

.syntax_checks: &syntax_checks
.static_tests: &static_tests
script:
- bundle exec rake syntax
- bundle exec rake lint
- bundle exec rake check:dot_underscore
- bundle exec rake check:test_file
- bundle exec rake pkg:check_version
- bundle exec rake compare_latest_tag
- bundle exec rake lint
- puppet module build

.spec_tests: &spec_tests
script:
- bundle exec rake pkg:compare_latest_tag
- bundle exec rake spec
- bundle exec puppet module build

stages:
- syntax
- unit
- acceptance
- deploy

puppet-syntax:
stage: syntax
tags:
- docker
image: ruby:2.4
<<: *cache_bundler
<<: *setup_bundler_env
<<: *syntax_checks

# Puppet 4
unit-ruby-2.1.9:
puppet-gemfile:
stage: unit
tags:
- docker
image: ruby:2.1.9
<<: *cache_bundler
<<: *setup_bundler_env
<<: *spec_tests

# Puppet 5
unit-ruby-2.4.1:
stage: unit
tags:
- docker
image: ruby:2.4
<<: *cache_bundler
<<: *setup_bundler_env
<<: *spec_tests
<<: *static_tests

# For PE LTS Support
# See: https://puppet.com/misc/puppet-enterprise-lifecycle
puppet4.7-syntax:
stage: syntax
tags:
- docker
image: ruby:2.1
variables:
PUPPET_VERSION: '4.7'
<<: *cache_bundler
<<: *setup_bundler_env
<<: *syntax_checks

unit-puppet4.7-ruby-2.1:
puppet-4.7:
stage: unit
tags:
- docker
image: ruby:2.1
image: ruby:2.1.9
variables:
PUPPET_VERSION: '4.7'
<<: *cache_bundler
<<: *setup_bundler_env
<<: *spec_tests

puppet5-syntax:
stage: syntax
tags:
- docker
image: ruby:2.4
variables:
PUPPET_VERSION: '5.0'
<<: *cache_bundler
<<: *setup_bundler_env
<<: *syntax_checks
<<: *static_tests

unit-puppet5-ruby-2.4:
puppet-5:
stage: unit
tags:
- docker
Expand All @@ -106,25 +63,40 @@ unit-puppet5-ruby-2.4:
PUPPET_VERSION: '5.0'
<<: *cache_bundler
<<: *setup_bundler_env
<<: *spec_tests
<<: *static_tests
allow_failure: true

acceptance-default:
default:
stage: acceptance
tags:
- beaker
<<: *cache_bundler
<<: *setup_bundler_env
variables:
PUPPET_VERSION: '4.10'
script:
- bundle exec rake beaker:suites[default]

acceptance-default-fips:
default-fips:
stage: acceptance
tags:
- beaker
<<: *cache_bundler
<<: *setup_bundler_env
variables:
BEAKER_fips: 'yes'
PUPPET_VERSION: '4.10'
script:
- bundle exec rake beaker:suites[default]

default-latest:
stage: acceptance
tags:
- beaker
<<: *cache_bundler
<<: *setup_bundler_env
variables:
PUPPET_VERSION: '5.0.0'
script:
- bundle exec rake beaker:suites[default]
allow_failure: true
11 changes: 8 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ before_install:
- rm -f Gemfile.lock

jobs:
allow_failures:
# https://tickets.puppetlabs.com/browse/PUP-8418
- env: STRICT_VARIABLES=yes TRUSTED_NODE_DATA=yes PUPPET_VERSION="~> 5.0"

include:
- stage: spec
rvm: 2.4.1
Expand All @@ -33,9 +37,10 @@ jobs:
- bundle exec rake check:dot_underscore
- bundle exec rake check:test_file
- bundle exec rake pkg:check_version
- bundle exec rake metadata_lint
- bundle exec rake compare_latest_tag
- bundle exec rake lint
- bundle exec rake metadata_lint
- bundle exec rake pkg:compare_latest_tag
- bundle exec rake pkg:create_tag_changelog
- bundle exec puppet module build

- stage: spec
Expand All @@ -62,14 +67,14 @@ jobs:
script:
- bundle exec rake spec

# This needs to be last since we have an acceptance test
- stage: deploy
rvm: 2.4.1
script:
- true
before_deploy:
- "export PUPMOD_METADATA_VERSION=`ruby -r json -e \"puts JSON.parse(File.read('metadata.json')).fetch('version')\"`"
- '[[ $TRAVIS_TAG =~ ^simp-${PUPMOD_METADATA_VERSION}$|^${PUPMOD_METADATA_VERSION}$ ]]'

deploy:
- provider: releases
api_key:
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ group :test do
gem 'puppet-lint-empty_string-check', :require => false
gem 'puppet-lint-trailing_comma-check', :require => false
gem 'simp-rspec-puppet-facts', ENV.fetch('SIMP_RSPEC_PUPPET_FACTS_VERSION', '~> 2.0')
gem 'simp-rake-helpers', ENV.fetch('SIMP_RAKE_HELPERS_VERSION', '~> 4.0')
gem 'simp-rake-helpers', ENV.fetch('SIMP_RAKE_HELPERS_VERSION', ['>= 5.2', '< 6.0'])
end

group :development do
Expand Down

0 comments on commit aa7aaa6

Please sign in to comment.