Skip to content

Commit

Permalink
initial support for Amazon Linux 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Caleb Hailey committed Oct 15, 2019
1 parent c4d3bb5 commit 8d83ae5
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
9 changes: 9 additions & 0 deletions .bonsai.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@ builds:
- "entity.system.platform == 'alpine'"
- "entity.system.arch == 'amd64'"

- platform: "amazon"
arch: "amd64"
asset_filename: "monitoring-plugins-amazon_#{version}_linux_amd64.tar.gz"
sha_filename: "#{repo}_#{version}_sha512-checksums.txt"
filter:
- "entity.system.os == 'linux'"
- "entity.system.platform == 'amazon'"
- "entity.system.arch == 'amd64'"

- platform: "centos"
arch: "amd64"
asset_filename: "monitoring-plugins-centos_#{version}_linux_amd64.tar.gz"
Expand Down
12 changes: 12 additions & 0 deletions Dockerfile.amazon
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM amazonlinux:2 as builder

ARG SENSU_GO_ASSET_NAME="monitoring-plugins-amazon"
ARG SENSU_GO_ASSET_VERSION="2.2.0"
ARG PLUGINS="check_http"

ADD create-sensu-asset /usr/bin/create-sensu-asset

WORKDIR /usr/lib64/nagios/plugins/

RUN amazon-linux-extras install -y epel && yum install -y which tar nagios-plugins-all
RUN create-sensu-asset -a $SENSU_GO_ASSET_NAME -b $PLUGINS -v $SENSU_GO_ASSET_VERSION -o /
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export PLUGINS="check_disk,check_http,check_ntp,check_ntp_peer,check_ntp_time,ch
export SENSU_GO_ASSET_VERSION=$(git describe --abbrev=0 --tags)

mkdir assets/
for PLATFORM in alpine debian centos;
for PLATFORM in alpine amazon centos debian;
do
export SENSU_GO_ASSET_FILENAME="monitoring-plugins-${PLATFORM}_${SENSU_GO_ASSET_VERSION}_linux_amd64.tar.gz"
docker build --build-arg "PLUGINS=$PLUGINS" --build-arg "SENSU_GO_ASSET_VERSION=$SENSU_GO_ASSET_VERSION" -t monitoring-plugins-${PLATFORM}:$SENSU_GO_ASSET_VERSION -f Dockerfile.${PLATFORM} .
Expand Down

0 comments on commit 8d83ae5

Please sign in to comment.