From 7e5accd8dc06d60e05dd1fb81885e36e5d39a325 Mon Sep 17 00:00:00 2001 From: Trevor Vaughan Date: Tue, 27 Nov 2018 11:56:37 -0500 Subject: [PATCH] (SIMP-5735) Fix Travis deploy logic (#5) --- .gitlab-ci.yml | 54 ++++++++++++++++++++++++++++---------------------- .travis.yml | 9 +++++---- CHANGELOG | 2 +- metadata.json | 2 +- 4 files changed, 37 insertions(+), 30 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index db7e5d7..4b52e6e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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' @@ -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 #----------------------------------------------------------------------- @@ -93,7 +95,6 @@ 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: @@ -101,16 +102,14 @@ variables: 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 #----------------------------------------------------------------------- @@ -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 @@ -164,7 +163,7 @@ sanity_checks: #----------------------------------------------------------------------- pup4-lint: - <<: *pup_4_10 + <<: *pup_4 <<: *lint_tests pup5-lint: @@ -178,15 +177,11 @@ 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 @@ -194,40 +189,51 @@ 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]' + diff --git a/.travis.yml b/.travis.yml index 3148e84..86e54a7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 @@ -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 @@ -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 @@ -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: diff --git a/CHANGELOG b/CHANGELOG index 81d33a8..a126c28 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,4 @@ -* Wed Nov 21 2018 Adam Yohrling - 0.1.1 +* Wed Nov 21 2018 Adam Yohrling - 0.1.0 - Added OEL support * Mon Nov 05 2018 Liz Nemsick - 0.1.0 diff --git a/metadata.json b/metadata.json index dcc0c6e..e160973 100644 --- a/metadata.json +++ b/metadata.json @@ -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",