Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor/ci testing #38

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions .bonsai.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: "#{repo}"
builds:
- platform: "alpine"
arch: "amd64"
asset_filename: "monitoring-plugins-alpine_#{version}_linux_amd64.tar.gz"
asset_filename: "monitoring-plugins-alpine_linux_amd64_#{version}.tar.gz"
sha_filename: "#{repo}_#{version}_sha512-checksums.txt"
filter:
- "entity.system.os == 'linux'"
Expand All @@ -12,7 +12,7 @@ builds:

- platform: "amazon1"
arch: "amd64"
asset_filename: "monitoring-plugins-amazon1_#{version}_linux_amd64.tar.gz"
asset_filename: "monitoring-plugins-debian8_linux_amd64_#{version}.tar.gz"
sha_filename: "#{repo}_#{version}_sha512-checksums.txt"
filter:
- "entity.system.os == 'linux'"
Expand All @@ -24,7 +24,7 @@ builds:

- platform: "amazon2"
arch: "amd64"
asset_filename: "monitoring-plugins-amazon2_#{version}_linux_amd64.tar.gz"
asset_filename: "monitoring-plugins-debian8_linux_amd64_#{version}.tar.gz"
sha_filename: "#{repo}_#{version}_sha512-checksums.txt"
filter:
- "entity.system.os == 'linux'"
Expand All @@ -34,7 +34,7 @@ builds:

- platform: "centos6"
arch: "amd64"
asset_filename: "monitoring-plugins-centos6_#{version}_linux_amd64.tar.gz"
asset_filename: "monitoring-plugins-centos6_linux_amd64_#{version}.tar.gz"
sha_filename: "#{repo}_#{version}_sha512-checksums.txt"
filter:
- "entity.system.os == 'linux'"
Expand All @@ -44,7 +44,7 @@ builds:

- platform: "centos7"
arch: "amd64"
asset_filename: "monitoring-plugins-centos7_#{version}_linux_amd64.tar.gz"
asset_filename: "monitoring-plugins-debian8_linux_amd64_#{version}.tar.gz"
sha_filename: "#{repo}_#{version}_sha512-checksums.txt"
filter:
- "entity.system.os == 'linux'"
Expand All @@ -54,7 +54,7 @@ builds:

- platform: "centos8"
arch: "amd64"
asset_filename: "monitoring-plugins-centos8_#{version}_linux_amd64.tar.gz"
asset_filename: "monitoring-plugins-debian8_linux_amd64_#{version}.tar.gz"
sha_filename: "#{repo}_#{version}_sha512-checksums.txt"
filter:
- "entity.system.os == 'linux'"
Expand All @@ -64,7 +64,7 @@ builds:

- platform: "debian8"
arch: "amd64"
asset_filename: "monitoring-plugins-debian8_#{version}_linux_amd64.tar.gz"
asset_filename: "monitoring-plugins-debian8_linux_amd64_#{version}.tar.gz"
sha_filename: "#{repo}_#{version}_sha512-checksums.txt"
filter:
- "entity.system.os == 'linux'"
Expand All @@ -74,7 +74,7 @@ builds:

- platform: "debian9"
arch: "amd64"
asset_filename: "monitoring-plugins-debian9_#{version}_linux_amd64.tar.gz"
asset_filename: "monitoring-plugins-debian8_linux_amd64_#{version}.tar.gz"
sha_filename: "#{repo}_#{version}_sha512-checksums.txt"
filter:
- "entity.system.os == 'linux'"
Expand All @@ -84,7 +84,7 @@ builds:

- platform: "debian10"
arch: "amd64"
asset_filename: "monitoring-plugins-debian10_#{version}_linux_amd64.tar.gz"
asset_filename: "monitoring-plugins-debian8_linux_amd64_#{version}.tar.gz"
sha_filename: "#{repo}_#{version}_sha512-checksums.txt"
filter:
- "entity.system.os == 'linux'"
Expand All @@ -94,7 +94,7 @@ builds:

- platform: "debian11"
arch: "amd64"
asset_filename: "monitoring-plugins-debian11_#{version}_linux_amd64.tar.gz"
asset_filename: "monitoring-plugins-debian8_linux_amd64_#{version}.tar.gz"
sha_filename: "#{repo}_#{version}_sha512-checksums.txt"
filter:
- "entity.system.os == 'linux'"
Expand All @@ -104,7 +104,7 @@ builds:

- platform: "ubuntu1404"
arch: "amd64"
asset_filename: "monitoring-plugins-ubuntu1404_#{version}_linux_amd64.tar.gz"
asset_filename: "monitoring-plugins-debian8_linux_amd64_#{version}.tar.gz"
sha_filename: "#{repo}_#{version}_sha512-checksums.txt"
filter:
- "entity.system.os == 'linux'"
Expand All @@ -114,7 +114,7 @@ builds:

- platform: "ubuntu1604"
arch: "amd64"
asset_filename: "monitoring-plugins-ubuntu1604_#{version}_linux_amd64.tar.gz"
asset_filename: "monitoring-plugins-debian8_linux_amd64_#{version}.tar.gz"
sha_filename: "#{repo}_#{version}_sha512-checksums.txt"
filter:
- "entity.system.os == 'linux'"
Expand All @@ -124,7 +124,7 @@ builds:

- platform: "ubuntu1804"
arch: "amd64"
asset_filename: "monitoring-plugins-ubuntu1804_#{version}_linux_amd64.tar.gz"
asset_filename: "monitoring-plugins-debian8_linux_amd64_#{version}.tar.gz"
sha_filename: "#{repo}_#{version}_sha512-checksums.txt"
filter:
- "entity.system.os == 'linux'"
Expand All @@ -134,7 +134,7 @@ builds:

- platform: "ubuntu2004"
arch: "amd64"
asset_filename: "monitoring-plugins-ubuntu2004_#{version}_linux_amd64.tar.gz"
asset_filename: "monitoring-plugins-debian8_linux_amd64_#{version}.tar.gz"
sha_filename: "#{repo}_#{version}_sha512-checksums.txt"
filter:
- "entity.system.os == 'linux'"
Expand All @@ -144,7 +144,7 @@ builds:

- platform: "ubuntu2204"
arch: "amd64"
asset_filename: "monitoring-plugins-ubuntu2204_#{version}_linux_amd64.tar.gz"
asset_filename: "monitoring-plugins-debian8_linux_amd64_#{version}.tar.gz"
sha_filename: "#{repo}_#{version}_sha512-checksums.txt"
filter:
- "entity.system.os == 'linux'"
Expand All @@ -154,7 +154,7 @@ builds:

- platform: "xcp-ng8"
arch: "amd64"
asset_filename: "monitoring-plugins-centos7_#{version}_linux_amd64.tar.gz"
asset_filename: "monitoring-plugins-debian8_linux_amd64_#{version}.tar.gz"
sha_filename: "#{repo}_#{version}_sha512-checksums.txt"
filter:
- "entity.system.os == 'linux'"
Expand Down
15 changes: 4 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,22 @@ on:
push:
tags:
- '*'

jobs:
build:
name: Publish binaries
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build
run: ./travis-build.sh
env:
TRAVIS_REPO_SLUG: ${{github.repository}}
TRAVIS_TAG: ${{github.ref_name}}
FULL_PRUNE: 1
- name: Sha512sum
run: cd dist && sha512sum ./*.tar.gz > "./monitoring-plugins_${TRAVIS_TAG}_sha512-checksums.txt"
run: ./scripts/build_and_validate.sh
env:
TRAVIS_REPO_SLUG: ${{github.repository}}
TRAVIS_TAG: ${{github.ref_name}}
ASSET_VERSION: ${{github.ref_name}}
ASSET_REPONAME: monitoring-plugins
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dist/*
file: assets/*
tag: ${{ github.ref_name }}
overwrite: true
file_glob: true
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Test
on: [push]

jobs:
build:
name: Build and Validate
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build and Validate
run: ./scripts/build_and_validate.sh
env:
ASSET_VERSION: ${{github.sha}}
ASSET_REPONAME: monitoring-plugins

21 changes: 0 additions & 21 deletions .travis.yml

This file was deleted.

Empty file added builds/disabled/.touch
Empty file.
Empty file added builds/enabled/.touch
Empty file.
File renamed without changes.
1 change: 1 addition & 0 deletions builds/enabled/alpine_linux_amd64/test_platforms
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
frolvlad/alpine-bash
File renamed without changes.
1 change: 1 addition & 0 deletions builds/enabled/centos6_linux_amd64/test_platforms
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
centos:6 amazonlinux:1 amazonlinux:2 centos:7
File renamed without changes.
1 change: 1 addition & 0 deletions builds/enabled/debian8_linux_amd64/test_platforms
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
debian:8 amazonlinux:1 amazonlinux:2 debian:9 debian:10 debian:11 ubuntu:22.04 ubuntu:20.04 ubuntu:18.04 ubuntu:16.04 ubuntu:14.04 centos:7 centos:8 rockylinux:8
2 changes: 1 addition & 1 deletion create-sensu-asset
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ if [[ $ASSET_ARCH = "_x86_64" ]]; then
export ASSET_ARCH="_amd64"
fi

ASSET="${OUTPUT_DIR}/${ASSET_NAME}${ASSET_VERSION}${ASSET_OS}${ASSET_ARCH}.tar.gz"
ASSET="${OUTPUT_DIR}/${ASSET_NAME}${ASSET_OS}${ASSET_ARCH}${ASSET_VERSION}.tar.gz"
echo "";
echo "Packaging contents of ${PKG_DIR} into ${ASSET}";
echo "";
Expand Down
21 changes: 21 additions & 0 deletions old/Dockerfile.alpine
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM alpine:latest as builder

ARG SENSU_GO_ASSET_NAME="monitoring-plugins-alpine"
ARG SENSU_GO_ASSET_VERSION="2.7.0"
ARG PLUGINS="check_http"

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

WORKDIR /

RUN apk --update add bash coreutils libintl curl gcc g++ make openssl-dev net-snmp-tools linux-headers procps && \
curl -s -L -O https://www.monitoring-plugins.org/download/monitoring-plugins-2.3.1.tar.gz && \
tar xzf monitoring-plugins-2.3.1.tar.gz && \
cd monitoring-plugins-2.3.1 && \
./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 /
File renamed without changes.
File renamed without changes.
24 changes: 24 additions & 0 deletions old/Dockerfile.centos6
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM centos:6 as builder

ARG SENSU_GO_ASSET_NAME="monitoring-plugins-centos6"
ARG SENSU_GO_ASSET_VERSION="2.7.0"
ARG PLUGINS="check_http"

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

WORKDIR /usr/lib64/nagios/plugins/

WORKDIR /

RUN curl https://www.getpagespeed.com/files/centos6-eol.repo --output /etc/yum.repos.d/CentOS-Base.repo
RUN yum groupinstall -y "Development Tools" && yum install -y curl expat-devel openssl openssl-devel net-snmp-utils bind-utils && \
curl -s -L -O https://www.monitoring-plugins.org/download/monitoring-plugins-2.3.1.tar.gz && \
tar xzf monitoring-plugins-2.3.1.tar.gz && \
cd monitoring-plugins-2.3.1 && \
./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 /
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
23 changes: 23 additions & 0 deletions old/Dockerfile.debian8
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM debian:jessie as builder

ARG SENSU_GO_ASSET_NAME="monitoring-plugins-debian8"
ARG SENSU_GO_ASSET_VERSION="2.7.0"
ARG PLUGINS="check_http"

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

WORKDIR /

RUN apt-get update
RUN apt-get install -y curl
RUN curl -k -s -L -O https://www.monitoring-plugins.org/download/monitoring-plugins-2.3.1.tar.gz
RUN apt-get install -y build-essential curl libexpat1-dev openssl libssl-dev libz-dev snmp dnsutils && \
tar xzf monitoring-plugins-2.3.1.tar.gz && \
cd monitoring-plugins-2.3.1 && \
./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 /
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading