Skip to content

Commit

Permalink
(SIMP-5585) Static asset update redo (#17)
Browse files Browse the repository at this point in the history
Re-fixed files

SIMP-5585 #comment simp-utils redo
  • Loading branch information
lnemsick-simp authored and trevor-vaughan committed Nov 7, 2018
1 parent a671341 commit cd4e699
Show file tree
Hide file tree
Showing 2 changed files with 124 additions and 62 deletions.
125 changes: 76 additions & 49 deletions .gitlab-ci.yml
Expand Up @@ -5,22 +5,25 @@
# https://puppet.com/docs/pe/2018.1/overview/getting_support_for_pe.html
# ------------------------------------------------------------------------------
# Release Puppet Ruby EOL
# PE 2016.4.15 4.10.12 2.1.9 2018-12 (LTS)
# SIMP 6.0 4.8.2 2.1.9 TBD
# SIMP 6.1 4.10.6 2.1.9 TBD
# SIMP 6.2 4.10.12 2.1.9 TBD
# PE 2016.4.15 4.10.12 2.1.9 2018-12 (LTS)
# PE 2017.3.10 5.3.8 2.4.4 2018-12 (STS)
# SIMP 6.3 5.5.7 2.4.4 TBD***
# PE 2018.1 5.5.6 2.4.4 2020-05 (LTS)***
# PE 2019.0 6.0 2.5.1 2019-08-31^^^
#
# *** = Modules created for SIMP 6.3+ are not required to support Puppet < 5.5
# ^^^ = SIMP doesn't support 6 yet; tests are info-only and allowed to fail
---
stages:
- 'sanity'
- 'validation'
- 'acceptance'
- 'compliance'
- 'deployment'

image: 'ruby:2.1'
image: 'ruby:2.4'

variables:
PUPPET_VERSION: 'UNDEFINED' # <- Matrixed jobs MUST override this (or fail)
Expand Down Expand Up @@ -54,46 +57,62 @@ variables:
- 'mkdir -p ${GEM_HOME} ${BUNDLER_BIN}'
- 'gem list -ie "${GEM_BUNDLER_VER[@]}" --silent bundler || "${GEM_INSTALL_CMD[@]}" --local "${GEM_BUNDLER_VER[@]}" bundler || "${GEM_INSTALL_CMD[@]}" "${GEM_BUNDLER_VER[@]}" bundler'
- 'rm -rf pkg/ || :'
- 'bundle check || rm -f Gemfile.lock && ("${BUNDLER_INSTALL_CMD[@]}" --local || "${BUNDLER_INSTALL_CMD[@]}" || bundle pristine || "${BUNDLER_INSTALL_CMD[@]}") || echo "PIPELNE: Bundler could not find everything"'
- 'bundle check || rm -f Gemfile.lock && ("${BUNDLER_INSTALL_CMD[@]}" --local || "${BUNDLER_INSTALL_CMD[@]}" || bundle pristine || "${BUNDLER_INSTALL_CMD[@]}") || { echo "PIPELINE: Bundler could not install everything (see log output above)" && exit 99 ; }'

# To avoid running a prohibitive number of tests every commit,
# don't set this env var in your gitlab instance
.only_with_SIMP_FULL_MATRIX: &only_with_SIMP_FULL_MATRIX
only:
variables:
- $SIMP_FULL_MATRIX
- $SIMP_FULL_MATRIX == "yes"

# Puppet + testing environments
# --------------------------------------
.pup_prev: &pup_prev
# Puppet Versions
#-----------------------------------------------------------------------

.pup_4: &pup_4
image: 'ruby:2.4'
variables:
PUPPET_VERSION: '~> 4.0'
MATRIX_RUBY_VERSION: '2.1'

.pup_4_10: &pup_4_10
image: 'ruby:2.1'
variables:
PUPPET_VERSION: '~> 4.10.4'
MATRIX_RUBY_VERSION: '2.1'

# PE 2018.1
.pe_current: &pe_current
.pup_5: &pup_5
image: 'ruby:2.4'
variables:
PUPPET_VERSION: '5.5.6'
PUPPET_VERSION: '~> 5.0'
BEAKER_PUPPET_COLLECTION: 'puppet5'
MATRIX_RUBY_VERSION: '2.4'

# Puppet for 6.3
.pup_current: &pup_current
.pup_5_3: &pup_5_3
image: 'ruby:2.4'
variables:
PUPPET_VERSION: '5.5.7'
PUPPET_VERSION: '~> 5.3.0'
BEAKER_PUPPET_COLLECTION: 'puppet5'
MATRIX_RUBY_VERSION: '2.4'

.pup_latest: &pup_latest
.pup_5_5_7: &pup_5_5_7
image: 'ruby:2.4'
variables:
PUPPET_VERSION: '~> 5.0'
PUPPET_VERSION: '5.5.7'
BEAKER_PUPPET_COLLECTION: 'puppet5'
MATRIX_RUBY_VERSION: '2.4'

.pup_6: &pup_6
allow_failure: true
image: 'ruby:2.5'
variables:
PUPPET_VERSION: '~> 6.0'
BEAKER_PUPPET_COLLECTION: 'puppet6'
MATRIX_RUBY_VERSION: '2.5'


# Testing Environments
#-----------------------------------------------------------------------

.lint_tests: &lint_tests
stage: 'validation'
Expand All @@ -102,6 +121,7 @@ variables:
script:
- 'bundle exec rake syntax'
- 'bundle exec rake lint'
- 'bundle exec rake metadata_lint'

.unit_tests: &unit_tests
stage: 'validation'
Expand All @@ -125,90 +145,97 @@ variables:
#=======================================================================

sanity_checks:
<<: *pup_latest
<<: *pup_5
<<: *setup_bundler_env
stage: 'sanity'
tags: ['docker']
script:
# The puppet gem is used by one of the scripts in this
# project, but puppet module checks are inapplicable
- 'if `hash apt-get`; then apt-get update; fi'
- 'if `hash apt-get`; then apt-get install -y rpm; fi'
# - 'bundle exec rake check:dot_underscore'
# - 'bundle exec rake check:test_file'
# - 'bundle exec rake pkg:check_version'
# Need rpm installed on GitLab docker containers, as
# pkg:compare_latest_tag uses rpm command to extract
# version and changelog info from the rpm spec file.
- 'apt-get update && apt-get install -y rpm'
- 'bundle exec rake pkg:compare_latest_tag'
- 'bundle exec rake pkg:create_tag_changelog'
# - 'bundle exec puppet module build'

# Linting
#-----------------------------------------------------------------------

# puppet module lint checks are inapplicable
#pup-prev-lint:
# <<: *pup_prev
#pup4-lint:
# <<: *pup_4
# <<: *lint_tests
#
#pup-current-lint:
# <<: *pup_current
#pup5-lint:
# <<: *pup_5
# <<: *lint_tests
#
#pup-latest-lint:
# <<: *pup_latest
#pup6-lint:
# <<: *pup_6
# <<: *lint_tests

# Unit Tests
#-----------------------------------------------------------------------

pup-prev-unit:
<<: *pup_prev
pup5-unit:
<<: *pup_5
<<: *unit_tests

pe-current-unit:
<<: *pe_current
pup5.3-unit:
<<: *pup_5_3
<<: *unit_tests

pup-current-unit:
<<: *pup_current
pup5.5.7-unit:
<<: *pup_5_5_7
<<: *unit_tests

pup-latest-unit:
<<: *pup_latest
pup4.10-unit:
<<: *pup_4_10
<<: *unit_tests

pup6-unit:
<<: *pup_6
<<: *unit_tests

pup-prev-default:
<<: *pup_prev
# Acceptance tests
# ==============================================================================
pup4.10:
<<: *pup_4_10
<<: *acceptance_base
script:
- 'bundle exec rake beaker:suites'

pup-prev-fips-default:
<<: *pup_prev
pup4.10-fips:
<<: *pup_4_10
<<: *acceptance_base
<<: *only_with_SIMP_FULL_MATRIX
script:
- 'BEAKER_fips=yes bundle exec rake beaker:suites'

pup-current-default:
<<: *pup_current
pup5.5.7:
<<: *pup_5_5_7
<<: *acceptance_base
script:
- 'bundle exec rake beaker:suites'

pup-current-fips-default:
<<: *pup_current
pup5.5.7-fips:
<<: *pup_5_5_7
<<: *acceptance_base
script:
- 'BEAKER_fips=yes bundle exec rake beaker:suites'

pup-current-oel-default:
<<: *pup_current
pup5.5.7-oel:
<<: *pup_5_5_7
<<: *acceptance_base
script:
- 'bundle exec rake beaker:suites[default,oel]'

pup-current-oel-fips-default:
<<: *pup_current
pup5.5.7-oel-fips:
<<: *pup_5_5_7
<<: *acceptance_base
<<: *only_with_SIMP_FULL_MATRIX
script:
- 'BEAKER_fips=yes bundle exec rake beaker:suites[default,oel]'

# vi:tabstop=2:shiftwidth=2:expandtab
61 changes: 48 additions & 13 deletions .travis.yml
@@ -1,20 +1,31 @@
# The testing matrix considers ruby/puppet versions supported by SIMP and PE:
#
# https://puppet.com/docs/pe/2018.1/component_versions_in_recent_pe_releases.html
# https://puppet.com/misc/puppet-enterprise-lifecycle
# https://puppet.com/docs/pe/2018.1/overview/getting_support_for_pe.html
# ------------------------------------------------------------------------------
# Release Puppet Ruby EOL
# PE 2016.4.15 4.10.12 2.1.9 2018-12 (LTS)
# SIMP 6.0 4.8.2 2.1.9 TBD
# SIMP 6.1 4.10.6 2.1.9 TBD
# SIMP 6.2 4.10.12 2.1.9 TBD
# SIMP 6.3 5.5.7 2.4.4 TBD***
# PE 2018.1 5.5.6 2.4.4 2020-05 (LTS)***
# SIMP 6.2 4.10 2.1.9 TBD
# PE 2016.4 4.10 2.1.9 2018-12-31 (LTS)
# PE 2017.3 5.3 2.4.4 2018-12-31
# SIMP 6.3 5.5 2.4.4 TBD***
# PE 2018.1 5.5 2.4.4 2020-05 (LTS)***
# PE 2019.0 6.0 2.5.1 2019-08-31^^^
#
# *** = Modules created for SIMP 6.3+ are not required to support Puppet < 5.5
# ^^^ = SIMP doesn't support 6 yet; tests are info-only and allowed to fail

---
language: ruby
cache: bundler
sudo: false

stages:
- check
- spec
- name: deploy
if: 'fork = false AND tag = true'

bundler_args: --without development system_tests --path .vendor

notifications:
Expand All @@ -27,38 +38,62 @@ addons:

before_install:
- rm -f Gemfile.lock
- gem update --system

global:
- STRICT_VARIABLES=yes

jobs:
allow_failures:
- name: 'Latest Puppet 6.x (allowed to fail)'

include:
- stage: check
rvm: 2.4.4
env: STRICT_VARIABLES=yes PUPPET_VERSION="~> 5.5"
env: PUPPET_VERSION="~> 5.5"

script:
# The puppet gem is used by one of the scripts in this
# project, but puppet module checks are inapplicable
- bundle exec rake pkg:compare_latest_tag
- bundle exec rake pkg:create_tag_changelog

- stage: spec
name: 'Puppet 4.10 (SIMP 6.2, PE 2016.4)'
rvm: 2.1.9
env: PUPPET_VERSION="~> 4.10.0"
script:
- bundle exec rake spec

- stage: spec
name: 'Puppet 5.3 (PE 2017.3)'
rvm: 2.4.4
env: STRICT_VARIABLES=yes PUPPET_VERSION="~> 5.5.6"
env: PUPPET_VERSION="~> 5.3.0"
script:
- bundle exec rake spec

- stage: spec
rvm: 2.4.4
env: STRICT_VARIABLES=yes PUPPET_VERSION="~> 5.5"
name: 'Puppet 5.5 (SIMP 6.3, PE 2018.1)'
env: PUPPET_VERSION="~> 5.5.0"
script:
- bundle exec rake spec

- stage: spec
rvm: 2.1.9
env: STRICT_VARIABLES=yes PUPPET_VERSION="~> 4.10.4"
name: 'Latest Puppet 5.x'
rvm: 2.4.4
env: PUPPET_VERSION="~> 5.0"
script:
- bundle exec rake spec

- stage: spec
name: 'Latest Puppet 6.x (allowed to fail)'
rvm: 2.5.1
env: PUPPET_VERSION="~>6.0"
script:
- bundle exec rake spec

- stage: deploy
rvm: 2.4.4
if: 'fork = false AND tag = true'
script:
- true
before_deploy:
Expand Down

0 comments on commit cd4e699

Please sign in to comment.