diff --git a/.bonsai.yml b/.bonsai.yml index 821f121..cd836dd 100644 --- a/.bonsai.yml +++ b/.bonsai.yml @@ -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" diff --git a/Dockerfile.ubuntu2004 b/Dockerfile.ubuntu2004 new file mode 100644 index 0000000..f69d946 --- /dev/null +++ b/Dockerfile.ubuntu2004 @@ -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 / diff --git a/build.sh b/build.sh index 90171f8..84c6214 100755 --- a/build.sh +++ b/build.sh @@ -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} . diff --git a/travis-build.sh b/travis-build.sh index 4d56aa5..d824165 100755 --- a/travis-build.sh +++ b/travis-build.sh @@ -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