Skip to content

Commit

Permalink
Merge pull request #144 from jspaleta/feature/bonsai-asset
Browse files Browse the repository at this point in the history
enable bonsai asset
  • Loading branch information
jspaleta authored May 8, 2019
2 parents b540a5a + f06bec3 commit 2519dcf
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 3 deletions.
28 changes: 28 additions & 0 deletions .bonsai.yml
Original file line number Diff line number Diff line change
@@ -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_family == '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_family == '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'"

14 changes: 12 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,15 @@ notifications:

before_script:
- docker run --name sensu-elasticsearch-6 -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" -d docker.elastic.co/elasticsearch/elasticsearch-oss:6.2.2
- bash -c "[ ! -d bonsai/ ] && git clone https://github.com/sensu/sensu-go-bonsai-asset.git bonsai || echo 'bonsai/ exists, skipping git clone'"

script:
- gem build sensu-plugins-elasticsearch.gemspec
- gem install sensu-plugins-elasticsearch-*.gem
- bundle exec rake quick
- bundle exec rake kitchen:ruby-`echo $TRAVIS_RUBY_VERSION | sed -e "s/\.//g"`-debian-8
#- bundle exec rake kitchen:ruby-`echo $TRAVIS_RUBY_VERSION | sed -e "s/\.//g"`-debian-8
deploy:
provider: rubygems
- provider: rubygems
api_key:
secure: lF7CO6Vfmd9+PR4vDdv5E4iL+NuOUacQR19DhBY+TNrz/BSD+ehAlaGMshbFICpZ6BtUKVj+lMlmjiKHEfcKrPuovO4AUE4wRQRiD/LSorBdgM06iJL6mGblrMiyCMfBs0FLkXVdrQRa5AHGY8Assw+JGS58Xrnh1pvttgP6Tyw=
gem: sensu-plugins-elasticsearch
Expand All @@ -35,3 +37,11 @@ deploy:
all_branches: true
rvm: 2.4.1
repo: sensu-plugins/sensu-plugins-elasticsearch
- provider: script
script: bonsai/ruby-runtime/travis-build-ruby-plugin-assets.sh sensu-plugins-elasticsearch
skip_cleanup: true
on:
tags: true
all_branches: true
rvm: 2.4.1

6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ This project adheres to [Semantic Versioning](http://semver.org/).
This CHANGELOG follows the format listed [here](https://github.com/sensu-plugins/community/blob/master/HOW_WE_CHANGELOG.md)

## [Unreleased]
### Breaking Changes
- Bump `sensu-plugin` dependency from `~> 3.0` 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.0.0] - 2018-12-17
### Breaking Changes
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
[![Code Climate](https://codeclimate.com/github/sensu-plugins/sensu-plugins-elasticsearch/badges/gpa.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-elasticsearch)
[![Test Coverage](https://codeclimate.com/github/sensu-plugins/sensu-plugins-elasticsearch/badges/coverage.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-elasticsearch)
[![Dependency Status](https://gemnasium.com/sensu-plugins/sensu-plugins-elasticsearch.svg)](https://gemnasium.com/sensu-plugins/sensu-plugins-elasticsearch)
[![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-elasticsearch)

## 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

Expand Down Expand Up @@ -34,6 +38,7 @@
[Installation and Setup](http://sensu-plugins.io/docs/installation_instructions.html)

## Notes
When using `handler-es-delete-indices.rb` with Sensu Go, you will need to use the event mapping commandline option, see `handler-es-delete-indices.rb --help` for details. And please read [the sensu-plugin README](https://github.com/sensu-plugins/sensu-plugin#sensu-go-enablement) for more information on the event mapping functionality.

## Testing

Expand Down
2 changes: 1 addition & 1 deletion sensu-plugins-elasticsearch.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Gem::Specification.new do |s| # rubocop:disable Metrics/BlockLength
s.add_runtime_dependency 'aws-sdk', ['>= 2.1.14', '< 2.5', '~> 2.1']
s.add_runtime_dependency 'elasticsearch', '~> 1.0.14'
s.add_runtime_dependency 'rest-client', '1.8.0'
s.add_runtime_dependency 'sensu-plugin', '~> 1.2'
s.add_runtime_dependency 'sensu-plugin', '~> 4.0'

s.add_development_dependency 'bundler', '~> 1.7'
s.add_development_dependency 'codeclimate-test-reporter', '~> 0.4'
Expand Down

0 comments on commit 2519dcf

Please sign in to comment.