diff --git a/.bonsai.yml b/.bonsai.yml new file mode 100644 index 0000000..4424e50 --- /dev/null +++ b/.bonsai.yml @@ -0,0 +1,28 @@ +--- +description: "#{repo}" +builds: +- platform: "debian" + arch: "amd64" + asset_filename: "#{repo}_#{version}_debian_linux_amd64.tar.gz" + sha_filename: "#{repo}_#{version}_sha512-checksums.txt" + filter: + - "entity.system.os == 'linux'" + - "entity.system.arch == 'amd64'" + - "entity.system.platform == 'debian'" +- platform: "centos" + arch: "amd64" + asset_filename: "#{repo}_#{version}_centos_linux_amd64.tar.gz" + sha_filename: "#{repo}_#{version}_sha512-checksums.txt" + filter: + - "entity.system.os == 'linux'" + - "entity.system.arch == 'amd64'" + - "entity.system.platform == 'rhel'" +- platform: "alpine" + arch: "amd64" + asset_filename: "#{repo}_#{version}_alpine_linux_amd64.tar.gz" + sha_filename: "#{repo}_#{version}_sha512-checksums.txt" + filter: + - "entity.system.os == 'linux'" + - "entity.system.arch == 'amd64'" + - "entity.system.platform == 'alpine'" + diff --git a/.travis.yml b/.travis.yml index f548462..ff08f43 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,11 @@ language: ruby +services: +- docker cache: - bundler install: - bundle install rvm: -- 2.1 -- 2.2 - 2.3.0 - 2.4.1 notifications: @@ -18,16 +18,23 @@ script: - bundle exec rake default - gem build sensu-plugins-process-checks.gemspec - gem install sensu-plugins-process-checks-*.gem +- bash -c "[ ! -d bonsai/ ] && git clone https://github.com/sensu/sensu-go-bonsai-asset.git bonsai || echo 'bonsai/ exists, skipping git clone'" deploy: - provider: rubygems +- provider: rubygems api_key: secure: K4zuPdQMW/jyCOO3+daQMp4dAlzdEi14qPx9Y09Zas5jFqCfbdIbK9fH3dzyuxoOOVrCjC9zW5EnNb8QveGcmRbtNx1ss4f626CLln2b+OE8jdmcQVHjVP1TmVI4Z2AvZnqSdKqPKQIiDPBHvO1BeIS4wgo2rXajuc7yUKOZuuA= gem: sensu-plugins-process-checks on: tags: true all_branches: true - rvm: 2.1 - rvm: 2.2 rvm: 2.3.0 rvm: 2.4.1 repo: sensu-plugins/sensu-plugins-process-checks +- provider: script + script: bonsai/ruby-runtime/travis-build-ruby-plugin-assets.sh sensu-plugins-process-checks + skip_cleanup: true + on: + tags: true + all_branches: true + rvm: 2.4.1 + diff --git a/CHANGELOG.md b/CHANGELOG.md index 814aca8..59ca607 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,14 @@ This CHANGELOG follows the format listed [here](https://github.com/sensu-plugins ## [Unreleased] +### Breaking Changes +- Update minimum required ruby version to 2.3. Drop unsupported ruby versions. +- Bump `sensu-plugin` dependency from `~> 1.2` to `~> 4.0` you can read the changelog entries for [4.0](https://github.com/sensu-plugins/sensu-plugin/blob/master/CHANGELOG.md#400---2018-02-17), [3.0](https://github.com/sensu-plugins/sensu-plugin/blob/master/CHANGELOG.md#300---2018-12-04), and [2.0](https://github.com/sensu-plugins/sensu-plugin/blob/master/CHANGELOG.md#v200---2017-03-29) + +### Added +- Travis build automation to generate Sensu Asset tarballs that can be used n conjunction with Sensu provided ruby runtime assets and the Bonsai Asset Index +- Require latest sensu-plugin for [Sensu Go support](https://github.com/sensu-plugins/sensu-plugin#sensu-go-enablement) + ## [3.2.0] - 2018-05-02 ### Fixed diff --git a/README.md b/README.md index 7a8b7a3..4cc5fbe 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,10 @@ [![Code Climate](https://codeclimate.com/github/sensu-plugins/sensu-plugins-process-checks/badges/gpa.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-process-checks) [![Test Coverage](https://codeclimate.com/github/sensu-plugins/sensu-plugins-process-checks/badges/coverage.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-process-checks) [![Dependency Status](https://gemnasium.com/sensu-plugins/sensu-plugins-process-checks.svg)](https://gemnasium.com/sensu-plugins/sensu-plugins-process-checks) +[![Sensu Bonsai Asset](https://img.shields.io/badge/Bonsai-Download%20Me-brightgreen.svg?colorB=89C967&logo=sensu)](https://bonsai.sensu.io/assets/sensu-plugins/sensu-plugins-process-checks) + +## Sensu Asset + The Sensu assets packaged from this repository are built against the Sensu ruby runtime environment. When using these assets as part of a Sensu Go resource (check, mutator or handler), make sure you include the corresponding Sensu ruby runtime asset in the list of assets needed by the resource. The current ruby-runtime assets can be found [here](https://bonsai.sensu.io/assets/sensu/sensu-ruby-runtime) in the [Bonsai Asset Index](bonsai.sensu.io). ## Functionality diff --git a/sensu-plugins-process-checks.gemspec b/sensu-plugins-process-checks.gemspec index be07181..57ecaac 100644 --- a/sensu-plugins-process-checks.gemspec +++ b/sensu-plugins-process-checks.gemspec @@ -25,14 +25,14 @@ Gem::Specification.new do |s| # rubocop: disable Metrics/BlockLength s.platform = Gem::Platform::RUBY s.post_install_message = 'You can use the embedded Ruby by setting EMBEDDED_RUBY=true in /etc/default/sensu' s.require_paths = ['lib'] - s.required_ruby_version = '>= 2.1.0' + s.required_ruby_version = '>= 2.3.0' s.summary = 'Sensu plugins for checking running processes' s.test_files = s.files.grep(%r{^(test|spec|features)/}) s.version = SensuPluginsProcessChecks::Version::VER_STRING s.add_runtime_dependency 'english', '0.6.3' - s.add_runtime_dependency 'sensu-plugin', '~> 1.2' + s.add_runtime_dependency 'sensu-plugin', '~> 4.0' s.add_runtime_dependency 'sys-proctable', '~> 0.9.8' s.add_development_dependency 'bundler', '~> 1.7'