From 88549ed7d218bf9a2f09586d0f9a1b2114419e21 Mon Sep 17 00:00:00 2001 From: Pierre-Olivier Mercier Date: Sun, 30 Jan 2022 18:08:04 +0100 Subject: [PATCH] first commit --- .drone-manifest.yml | 22 +++++++++ .drone.yml | 118 ++++++++++++++++++++++++++++++++++++++++++++ Dockerfile | 21 ++++++++ 3 files changed, 161 insertions(+) create mode 100644 .drone-manifest.yml create mode 100644 .drone.yml create mode 100644 Dockerfile diff --git a/.drone-manifest.yml b/.drone-manifest.yml new file mode 100644 index 0000000..2ccf085 --- /dev/null +++ b/.drone-manifest.yml @@ -0,0 +1,22 @@ +image: nemunaire/nagios:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}} +{{#if build.tags}} +tags: +{{#each build.tags}} + - {{this}} +{{/each}} +{{/if}} +manifests: + - image: nemunaire/nagios:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64 + platform: + architecture: amd64 + os: linux + - image: nemunaire/nagios:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64 + platform: + architecture: arm64 + os: linux + variant: v8 + - image: nemunaire/nagios:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm + platform: + architecture: arm + os: linux + variant: v7 diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..1eec4e8 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,118 @@ +--- +kind: pipeline +type: docker +name: build-amd64 + +platform: + os: linux + arch: amd64 + +steps: + - name: docker build and publish + image: plugins/docker + settings: + username: + from_secret: docker_username + password: + from_secret: docker_password + repo: nemunaire/nagios + auto_tag: true + auto_tag_suffix: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH} + dockerfile: Dockerfile + when: + branch: + - master + +trigger: + event: + - custom + - push + - tag + +--- +kind: pipeline +type: docker +name: build-arm64 + +platform: + os: linux + arch: arm64 + +steps: + - name: docker build and publish + image: plugins/docker + settings: + username: + from_secret: docker_username + password: + from_secret: docker_password + repo: nemunaire/nagios + auto_tag: true + auto_tag_suffix: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH} + dockerfile: Dockerfile + when: + branch: + - master + +trigger: + event: + - custom + - push + - tag + +--- +kind: pipeline +type: docker +name: build-arm + +platform: + os: linux + arch: arm + +steps: + - name: docker build and publish + image: plugins/docker + settings: + username: + from_secret: docker_username + password: + from_secret: docker_password + repo: nemunaire/nagios + auto_tag: true + auto_tag_suffix: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH} + dockerfile: Dockerfile + when: + branch: + - master + +trigger: + event: + - custom + - push + - tag + +--- +kind: pipeline +name: docker-manifest +steps: + - name: publish manifest + image: plugins/manifest + settings: + auto_tag: true + ignore_missing: true + spec: .drone-manifest.yml + username: + from_secret: docker_username + password: + from_secret: docker_password + +trigger: + event: + - custom + - push + - tag + +depends_on: +- build-amd64 +- build-arm64 +- build-arm diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..c66879c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,21 @@ +FROM alpine + +RUN apk add --no-cache \ + nagios \ + nagios-plugins \ + nagios-plugins-dig \ + nagios-plugins-dns \ + nagios-plugins-http \ + nagios-plugins-ldap \ + nagios-plugins-mysql \ + nagios-plugins-pgsql \ + nagios-plugins-ping \ + nagios-plugins-smtp \ + nagios-plugins-ssh \ + nagios-plugins-ssl_validity \ + nagios-web \ + nrpe-plugin + +USER nagios + +CMD ["/usr/sbin/nagios", "/etc/nagios/nagios.cfg"]