Skip to content

Commit

Permalink
(SIMP-3290) Configure Travis to release upon tag (#5)
Browse files Browse the repository at this point in the history
This commit configures Travis CI to publish a release to the PUppet
Forge and GitHub when the GitHub repo is tagged with the same version as
`metadata.json`.

SIMP-3290 #comment Updated simp-chkrootkit
  • Loading branch information
op-ct authored and Nick Miller committed Jul 5, 2017
1 parent 21407b2 commit 8f042cc
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 21 deletions.
24 changes: 12 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
.*.sw?
.yardoc
dist
/pkg
/spec/fixtures
/spec/rp_env
dist/
pkg/
spec/fixtures/
spec/rp_env/
!/spec/hieradata/default.yaml
!/spec/fixtures/site.pp
/.rspec_system
/.vagrant
/.bundle
/Gemfile.lock
/vendor
/junit
/log
/doc
.rspec_system
.vagrant/
.bundle/
Gemfile.lock
vendor/
junit/
log/
doc/
38 changes: 29 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,43 @@ language: ruby
sudo: false
cache: bundler
before_script:
- bundle update
bundler_args: "--without development system_tests"
- bundle update
bundler_args: --without development system_tests
before_install: rm Gemfile.lock || true
script:
- bundle exec rake test
- bundle exec rake test
notifications:
email: false
rvm:
- 2.1.9
- 2.1.9
env:
global:
- STRICT_VARIABLES=yes
- STRICT_VARIABLES=yes
matrix:
- PUPPET_VERSION="~> 4.8.2"
- PUPPET_VERSION="~> 4.10.0"
- PUPPET_VERSION="~> 4.9.2"
- PUPPET_VERSION="~> 4.7.0"
- PUPPET_VERSION="~> 4.8.2" FORGE_PUBLISH=true
- PUPPET_VERSION="~> 4.10.0"
- PUPPET_VERSION="~> 4.9.2"
- PUPPET_VERSION="~> 4.7.0"
matrix:
fast_finish: true

before_deploy:
- 'bundle exec rake metadata_lint'
- "export PUPMOD_METADATA_VERSION=`ruby -r json -e \"puts JSON.parse(File.read('metadata.json')).fetch('version')\"`"
- '[[ $TRAVIS_TAG =~ ^${PUPMOD_METADATA_VERSION}$ ]]'
deploy:
- provider: puppetforge
user: simp
password:
secure: "weHKxY5HKhLO8et3b+wbEEmPbcUj4QLszARsD0f0Dlu9sPOi5/PthYmBpCaK8f8DZgNN7ejtBobAWqI5l+pXpD+PNswf37ZHbNORzp6QDXBOoS7wHg92jgxxY9tygmPbJ3zvWmIMP+iWktFIOwd8JSEDpYhhC0lYdxUbIJ4rb45M7OTc0k4ag/jwp7h1NZN2PCAWFwN4zkNxsEWmJVtmCKaMQMcT4V4frRnyPG97XJOiim9Wt6uKQiLAh4QCOwp/CcFvNRFR8N7flliurCrT6OwCmol4G9KTO4wmc1HNy7mIMZRDwqfEpHFN8w+2TTF4lVQ6jpjtq/RpgssR8TM+4K7e0nrfxpJF8CLVeUPzpYz6F9zCG8AHc2ix/z4Myj6KAG8ZNsNx9wmpaP29AmIULVbS6WcLNkXXux0+6ky2DXzQ+t1bSQVVwz6wnEa2+1k7QON5/b8PN1m8AmSP6ViEeAwHRCEJw7/Z/i/7YOtC4yEPfT+Q4fap2zRGH1ABkes3u3Od4BZEOGN1jeGVDBTji+cNanRgCFQCPWXzB9mb8RGT7ReXDRMs/kD5mkOxWErss//H7zZ6yRKD4PyYq5kjoDxBR+qYJn8ZGZYZSEgsTdSuXK6aO7/mxZGfduacvjkrBSNYlzRwaY6e2FnmeyenaPVTR60z3YEG2ce4UiTegTA="
on:
tags: true
rvm: 2.1.9
condition: '$FORGE_PUBLISH = true'
- provider: releases
api_key:
secure: "eyFFavsdZL3jceonFxIIQePil1JcYlUNVk5IyNEyq+CHjwf/TbijS9bk7t4OgDJTpuAvzZ1w3Nrotd0IN5dynpHfJlEpZdP37OjE0zmVULOWqMUTVsSpSW3B/R2VOMwQQHvsehpKZPL3Uhd5sTV5Ci7TfBAOZN0l6y5siF63w8jIIglBaqmlWCHoHZOmMpbm8g3QSYV1b6hPmSftKxOY03B8UVsl7ovfC7Of6HCt7cPr2hohK9v4ceuVL37ij1ajMj257+YCqss5gU5kn8K8F3L3dLHMG4RW/1OHaagYrdDz/U4yDjNGK742PHZiSg3Vp4y2eHdg1gAlHke/Tq2z8O5Ape1tC1coI+dOfuKFPdpqqQQ6WLb3COyEzE971gvyCi7lUL5xsoX94enmJ/mTBV5hjXFKSCBGfny90gNZ6DGMD7/dDGRHjT6q+f8bdaTBjfXkgoB/h/YdKcFJvvS2i/7I5wI5Z1hsk59h8sa7RbT/A2cUd+7uxVv9ATL0AIFk3gq0yFLdGQNfm6zjbmR+Kj9pVq4a/Fu2H1Fexoe58CAVIBgMi+I2SiFS9xDYBSRnH+H2XcU1n99aWKWi48MxvgUBLZMNtuBh1rkeDAn1OntmiObIKTfDM8QsxF0IztDYq8GWGulsrip2p3jGQZ1IlFNYLkfgt0WmS16Kf20079Q="
skip_cleanup: true
on:
tags: true
condition: '$FORGE_PUBLISH = true'

0 comments on commit 8f042cc

Please sign in to comment.