Skip to content

Commit 6570d2e

Browse files
author
Cameron Johnston
committed
add bonsai.yml and travis deploy steps
1 parent b7647ed commit 6570d2e

File tree

2 files changed

+37
-1
lines changed

2 files changed

+37
-1
lines changed

.bonsai.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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'"

.travis.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@ script:
2424
- bundle exec rake kitchen:ruby-`echo $TRAVIS_RUBY_VERSION | sed -e "s/\.//g"`-debian-8
2525
- gem build sensu-plugins-postgres.gemspec
2626
- gem install sensu-plugins-postgres-*.gem
27+
before_deploy:
28+
- bash -c "[ ! -d bonsai/ ] && git clone https://github.com/sensu/sensu-go-bonsai-asset.git bonsai || echo 'bonsai/ exists, skipping git clone'"
2729
deploy:
28-
provider: rubygems
30+
- provider: rubygems
2931
api_key:
3032
secure: L3ot3q90Sz+1dhi1Lxg4rvxZ0AEUCq2dL55Gzau48wou72T3GYSDBoqVGnZPmQcS9miNy4J7NZMxUgfoycnceqUkkue8+ss4c42NtrYs+SLU+rnmB/cwLTBQJ1ERRNXqgOYTwWt8EuIy6Dong1oCu8voFSj7NH4sXxTTO7RFho8=
3133
gem: sensu-plugins-postgres
@@ -34,3 +36,10 @@ deploy:
3436
all_branches: true
3537
rvm: 2.4.1
3638
repo: sensu-plugins/sensu-plugins-postgres
39+
- provider: script
40+
script: bonsai/ruby-runtime/travis-build-ruby-plugin-assets.sh sensu-plugins-postgres
41+
skip_cleanup: true
42+
on:
43+
tags: true
44+
all_branches: true
45+
rvm: 2.4.1

0 commit comments

Comments
 (0)