Skip to content

Commit

Permalink
(SIMP-5735) Fix Travis deploy logic (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
trevor-vaughan authored and lnemsick-simp committed Nov 27, 2018
1 parent a975ce8 commit 7e5accd
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 30 deletions.
54 changes: 30 additions & 24 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@
# 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'
Expand Down Expand Up @@ -55,14 +57,14 @@ 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 "PIPELINE: 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 Versions
#-----------------------------------------------------------------------
Expand Down Expand Up @@ -93,24 +95,21 @@ variables:
BEAKER_PUPPET_COLLECTION: 'puppet5'
MATRIX_RUBY_VERSION: '2.4'

# Puppet for SIMP 6.3, PE is at 5.5.6 but close enough
.pup_5_5_7: &pup_5_5_7
image: 'ruby:2.4'
variables:
PUPPET_VERSION: '5.5.7'
BEAKER_PUPPET_COLLECTION: 'puppet5'
MATRIX_RUBY_VERSION: '2.4'

# Experimental
#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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


# Testing Environments
#-----------------------------------------------------------------------
Expand All @@ -131,12 +130,12 @@ variables:
script:
- 'bundle exec rake spec'

.acceptance_tests: &acceptance_tests
.acceptance_base: &acceptance_base
stage: 'acceptance'
tags: ['beaker']
<<: *setup_bundler_env

.compliance_tests: &compliance_tests
.compliance_base: &compliance_base
stage: 'compliance'
tags: ['beaker']
<<: *setup_bundler_env
Expand Down Expand Up @@ -164,7 +163,7 @@ sanity_checks:
#-----------------------------------------------------------------------

pup4-lint:
<<: *pup_4_10
<<: *pup_4
<<: *lint_tests

pup5-lint:
Expand All @@ -178,56 +177,63 @@ pup6-lint:
# Unit Tests
#-----------------------------------------------------------------------

pup4.10-unit:
<<: *pup_4_10
<<: *unit_tests

pup5-unit:
<<: *pup_5
<<: *unit_tests

pup5_3-unit:
pup5.3-unit:
<<: *pup_5_3
<<: *unit_tests

pup5.5.7-unit:
<<: *pup_5_5_7
<<: *unit_tests

pup4.10-unit:
<<: *pup_4_10
<<: *unit_tests

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

# Acceptance Tests
#-----------------------------------------------------------------------

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

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

pup5.5.7:
<<: *pup_5_5_7
<<: *acceptance_tests
<<: *acceptance_base
script:
- 'bundle exec rake beaker:suites'

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

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

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]'

9 changes: 5 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ stages:
- check
- spec
- name: deploy
if: 'fork = false AND tag = true'
if: 'tag IS present'

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

Expand All @@ -48,8 +48,9 @@ jobs:

include:
- stage: check
name: 'Syntax, style, and validation checks'
rvm: 2.4.4
env: PUPPET_VERSION="~> 5.5"
env: PUPPET_VERSION="~> 5"
script:
- bundle exec rake check:dot_underscore
- bundle exec rake check:test_file
Expand All @@ -59,6 +60,7 @@ jobs:
- bundle exec rake pkg:create_tag_changelog
- bundle exec rake lint
- bundle exec puppet module build

- stage: spec
name: 'Puppet 4.10 (SIMP 6.2, PE 2016.4)'
rvm: 2.1.9
Expand Down Expand Up @@ -90,10 +92,9 @@ jobs:
- stage: spec
name: 'Latest Puppet 6.x (allowed to fail)'
rvm: 2.5.1
env: PUPPET_VERSION="~>6.0"
env: PUPPET_VERSION="~> 6.0"
script:
- bundle exec rake spec

- stage: deploy
rvm: 2.4.4
script:
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
* Wed Nov 21 2018 Adam Yohrling <adam.yohrling@onyxpoint.com> - 0.1.1
* Wed Nov 21 2018 Adam Yohrling <adam.yohrling@onyxpoint.com> - 0.1.0
- Added OEL support

* Mon Nov 05 2018 Liz Nemsick <lnemsick-simp@gmail.com> - 0.1.0
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "simp-tpm2",
"version": "0.1.1",
"version": "0.1.0",
"author": "SIMP Team",
"summary": "Manage TPM2.0 devices",
"license": "Apache-2.0",
Expand Down

0 comments on commit 7e5accd

Please sign in to comment.