Skip to content

Commit

Permalink
Added Ubuntu 20.04 support
Browse files Browse the repository at this point in the history
  • Loading branch information
Todd Campbell committed Apr 27, 2020
1 parent 5c9649b commit 3d793fc
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 2 deletions.
10 changes: 10 additions & 0 deletions .bonsai.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,16 @@ builds:
- "entity.system.platform_version.split('.')[0] == '18'"
- "entity.system.arch == 'amd64'"

- platform: "ubuntu2004"
arch: "amd64"
asset_filename: "monitoring-plugins-ubuntu2004_#{version}_linux_amd64.tar.gz"
sha_filename: "#{repo}_#{version}_sha512-checksums.txt"
filter:
- "entity.system.os == 'linux'"
- "entity.system.platform == 'ubuntu'"
- "entity.system.platform_version.split('.')[0] == '20'"
- "entity.system.arch == 'amd64'"

- platform: "xcp-ng8"
arch: "amd64"
asset_filename: "monitoring-plugins-centos7_#{version}_linux_amd64.tar.gz"
Expand Down
24 changes: 24 additions & 0 deletions Dockerfile.ubuntu2004
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM ubuntu:20.04 as builder

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

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

WORKDIR /

ENV DEBIAN_FRONTEND noninteractive

RUN apt-get update && \
apt-get install -y build-essential curl libexpat1-dev openssl libssl-dev libz-dev snmp dnsutils procps && \
curl -s -L -O https://www.monitoring-plugins.org/download/monitoring-plugins-2.2.tar.gz && \
tar xzf monitoring-plugins-2.2.tar.gz && \
cd monitoring-plugins-2.2 && \
./configure --prefix=/usr --libexecdir=/usr/lib/monitoring-plugins && \
make && \
make install

WORKDIR /usr/lib/monitoring-plugins/

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_dns,check_http,check_load,check_log,check_mailq
export SENSU_GO_ASSET_VERSION=$(git describe --abbrev=0 --tags)

mkdir assets/
for PLATFORM in alpine amazon1 amazon2 debian8 debian9 debian10 centos6 centos7 centos8 ubuntu1404 ubuntu1604 ubuntu1804;
for PLATFORM in alpine amazon1 amazon2 debian8 debian9 debian10 centos6 centos7 centos8 ubuntu1404 ubuntu1604 ubuntu1804 ubuntu2004;
do
export SENSU_GO_ASSET_FILENAME="monitoring-plugins-${PLATFORM}_${SENSU_GO_ASSET_VERSION}_linux_amd64.tar.gz"
docker build --no-cache --rm --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
2 changes: 1 addition & 1 deletion travis-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export PLUGINS="check_disk,check_dns,check_http,check_load,check_log,check_mailq
[[ -z "$GITHUB_TOKEN" ]] && { echo "GITHUB_TOKEN is empty, upload disabled" ; }
[[ -z "$TRAVIS_REPO_SLUG" ]] && { echo "TRAVIS_REPO_SLUG is empty"; exit 1; }
if [[ -z "$1" ]]; then
echo "Parameter 1, PLATFORMS is empty, using default set" ; platforms=( alpine alpine3.8 debian8 debian9 debian10 centos8 centos7 centos6 amazon1 amazon2 ubuntu1404 ubuntu1604 ubuntu1804 );
echo "Parameter 1, PLATFORMS is empty, using default set" ; platforms=( alpine alpine3.8 debian8 debian9 debian10 centos8 centos7 centos6 amazon1 amazon2 ubuntu1404 ubuntu1604 ubuntu1804 ubuntu2004 );
else
IFS=', ' read -r -a platforms <<< "$1"
fi
Expand Down

0 comments on commit 3d793fc

Please sign in to comment.