Skip to content

Commit 2519dcf

Browse files
authored
Merge pull request #144 from jspaleta/feature/bonsai-asset
enable bonsai asset
2 parents b540a5a + f06bec3 commit 2519dcf

File tree

5 files changed

+52
-3
lines changed

5 files changed

+52
-3
lines changed

.bonsai.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
description: "#{repo}"
3+
builds:
4+
- platform: "debian"
5+
arch: "amd64"
6+
asset_filename: "#{repo}_#{version}_debian_linux_amd64.tar.gz"
7+
sha_filename: "#{repo}_#{version}_sha512-checksums.txt"
8+
filter:
9+
- "entity.system.os == 'linux'"
10+
- "entity.system.arch == 'amd64'"
11+
- "entity.system.platform_family == 'debian'"
12+
- platform: "centos"
13+
arch: "amd64"
14+
asset_filename: "#{repo}_#{version}_centos_linux_amd64.tar.gz"
15+
sha_filename: "#{repo}_#{version}_sha512-checksums.txt"
16+
filter:
17+
- "entity.system.os == 'linux'"
18+
- "entity.system.arch == 'amd64'"
19+
- "entity.system.platform_family == 'rhel'"
20+
- platform: "alpine"
21+
arch: "amd64"
22+
asset_filename: "#{repo}_#{version}_alpine_linux_amd64.tar.gz"
23+
sha_filename: "#{repo}_#{version}_sha512-checksums.txt"
24+
filter:
25+
- "entity.system.os == 'linux'"
26+
- "entity.system.arch == 'amd64'"
27+
- "entity.system.platform == 'alpine'"
28+

.travis.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,15 @@ notifications:
2020

2121
before_script:
2222
- 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
23+
- bash -c "[ ! -d bonsai/ ] && git clone https://github.com/sensu/sensu-go-bonsai-asset.git bonsai || echo 'bonsai/ exists, skipping git clone'"
24+
2325
script:
2426
- gem build sensu-plugins-elasticsearch.gemspec
2527
- gem install sensu-plugins-elasticsearch-*.gem
2628
- bundle exec rake quick
27-
- bundle exec rake kitchen:ruby-`echo $TRAVIS_RUBY_VERSION | sed -e "s/\.//g"`-debian-8
29+
#- bundle exec rake kitchen:ruby-`echo $TRAVIS_RUBY_VERSION | sed -e "s/\.//g"`-debian-8
2830
deploy:
29-
provider: rubygems
31+
- provider: rubygems
3032
api_key:
3133
secure: lF7CO6Vfmd9+PR4vDdv5E4iL+NuOUacQR19DhBY+TNrz/BSD+ehAlaGMshbFICpZ6BtUKVj+lMlmjiKHEfcKrPuovO4AUE4wRQRiD/LSorBdgM06iJL6mGblrMiyCMfBs0FLkXVdrQRa5AHGY8Assw+JGS58Xrnh1pvttgP6Tyw=
3234
gem: sensu-plugins-elasticsearch
@@ -35,3 +37,11 @@ deploy:
3537
all_branches: true
3638
rvm: 2.4.1
3739
repo: sensu-plugins/sensu-plugins-elasticsearch
40+
- provider: script
41+
script: bonsai/ruby-runtime/travis-build-ruby-plugin-assets.sh sensu-plugins-elasticsearch
42+
skip_cleanup: true
43+
on:
44+
tags: true
45+
all_branches: true
46+
rvm: 2.4.1
47+

CHANGELOG.md

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

66
## [Unreleased]
7+
### Breaking Changes
8+
- 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)
9+
10+
### Added
11+
- 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
12+
- Require latest sensu-plugin for [Sensu Go support](https://github.com/sensu-plugins/sensu-plugin#sensu-go-enablement)
713

814
## [3.0.0] - 2018-12-17
915
### Breaking Changes

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
[![Code Climate](https://codeclimate.com/github/sensu-plugins/sensu-plugins-elasticsearch/badges/gpa.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-elasticsearch)
66
[![Test Coverage](https://codeclimate.com/github/sensu-plugins/sensu-plugins-elasticsearch/badges/coverage.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-elasticsearch)
77
[![Dependency Status](https://gemnasium.com/sensu-plugins/sensu-plugins-elasticsearch.svg)](https://gemnasium.com/sensu-plugins/sensu-plugins-elasticsearch)
8+
[![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)
9+
10+
## Sensu Asset
11+
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).
812

913
## Functionality
1014

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

3640
## Notes
41+
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.
3742

3843
## Testing
3944

sensu-plugins-elasticsearch.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Gem::Specification.new do |s| # rubocop:disable Metrics/BlockLength
3636
s.add_runtime_dependency 'aws-sdk', ['>= 2.1.14', '< 2.5', '~> 2.1']
3737
s.add_runtime_dependency 'elasticsearch', '~> 1.0.14'
3838
s.add_runtime_dependency 'rest-client', '1.8.0'
39-
s.add_runtime_dependency 'sensu-plugin', '~> 1.2'
39+
s.add_runtime_dependency 'sensu-plugin', '~> 4.0'
4040

4141
s.add_development_dependency 'bundler', '~> 1.7'
4242
s.add_development_dependency 'codeclimate-test-reporter', '~> 0.4'

0 commit comments

Comments
 (0)