From dbc7f8a2159eae866b44d526c3cea69ce38df413 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Wed, 28 Jun 2023 22:52:25 +0200 Subject: [PATCH] reactivate --- .drone.yml | 73 +++++++++++++++++++++++++++++++++++++++++++----------- Dockerfile | 12 +++------ README.md | 0 3 files changed, 61 insertions(+), 24 deletions(-) delete mode 100644 README.md diff --git a/.drone.yml b/.drone.yml index cbf5734..2d7afa6 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,40 +1,66 @@ --- kind: pipeline type: docker -name: default +name: linting + steps: - - name: run gitleaks + - name: gitleaks image: plugins/gitleaks settings: path: . + when: + event: + exclude: + - tag - name: hadolint image: hadolint/hadolint:latest-debian commands: - - hadolint --version - - hadolint Dockerfile + - hadolint Dockerfile - - name: docker_build_and_push_master +--- +kind: pipeline +type: docker +name: selfhosted +depends_on: # bezieht sich auf linting pipeline + - linting +steps: + - name: docker_build_and_push_selfhosted image: plugins/docker settings: - username: - from_secret: DOCKERHUB_USER - password: - from_secret: DOCKERHUB_PASS dockerfile: Dockerfile - repo: quotengrote/fpm + repo: registry.mgrote.net/fpm + registry: registry.mgrote.net tags: + - ${DRONE_COMMIT_SHA:0:8} + - ${DRONE_COMMIT_BRANCH} - latest - - ${DRONE_COMMIT_SHA:0:8} - - ${DRONE_COMMIT_BRANCH} when: - branch: - - main event: exclude: - pull_request + - tag - - name: docker_build_and_push + - name: docker_build_and_push_selfhosted_tag + image: plugins/docker + settings: + dockerfile: Dockerfile + repo: registry.mgrote.net/fpm + registry: registry.mgrote.net + tags: + - ${DRONE_TAG} + when: + event: + - tag + +--- +kind: pipeline +type: docker +name: dockerhub +depends_on: # bezieht sich auf linting pipeline + - linting +steps: + - name: docker_build_and_push_dockerhub image: plugins/docker settings: username: @@ -46,7 +72,24 @@ steps: tags: - ${DRONE_COMMIT_SHA:0:8} - ${DRONE_COMMIT_BRANCH} + - latest when: event: exclude: - pull_request + - tag + + - name: docker_build_and_push_dockerhub_tag + image: plugins/docker + settings: + username: + from_secret: DOCKERHUB_USER + password: + from_secret: DOCKERHUB_PASS + dockerfile: Dockerfile + repo: quotengrote/fpm + tags: + - ${DRONE_TAG} + when: + event: + - tag diff --git a/Dockerfile b/Dockerfile index 3322831..de2d8b7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,4 @@ -############################################################ -# Dockerfile to build fpm-build images -# fpm can be used to build .rpm or .deb packages -# Based on Debian -# See: https://fpm.readthedocs.io -############################################################ -FROM debian:buster-slim +FROM ubuntu:focal ENV DEBIAN_FRONTEND=noninteractive @@ -14,12 +8,12 @@ RUN apt-get update && \ ruby \ ruby-dev \ rubygems \ + squashfs-tools \ build-essential \ git \ wget \ rpm \ gawk \ && apt-get clean \ - && gem install public_suffix -v 4.0.7 \ - && gem install fpm --no-ri --no-rdoc \ + && gem install fpm \ && rm -rf /var/lib/apt/lists/* /var/tmp/* /tmp/* diff --git a/README.md b/README.md deleted file mode 100644 index e69de29..0000000