reactivate

This commit is contained in:
Michael Grote 2023-06-28 22:52:25 +02:00
parent 9cf4b00ab3
commit dbc7f8a215
3 changed files with 61 additions and 24 deletions

View file

@ -1,40 +1,66 @@
--- ---
kind: pipeline kind: pipeline
type: docker type: docker
name: default name: linting
steps: steps:
- name: run gitleaks - name: gitleaks
image: plugins/gitleaks image: plugins/gitleaks
settings: settings:
path: . path: .
when:
event:
exclude:
- tag
- name: hadolint - name: hadolint
image: hadolint/hadolint:latest-debian image: hadolint/hadolint:latest-debian
commands: 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 image: plugins/docker
settings: settings:
username:
from_secret: DOCKERHUB_USER
password:
from_secret: DOCKERHUB_PASS
dockerfile: Dockerfile dockerfile: Dockerfile
repo: quotengrote/fpm repo: registry.mgrote.net/fpm
registry: registry.mgrote.net
tags: tags:
- ${DRONE_COMMIT_SHA:0:8}
- ${DRONE_COMMIT_BRANCH}
- latest - latest
- ${DRONE_COMMIT_SHA:0:8}
- ${DRONE_COMMIT_BRANCH}
when: when:
branch:
- main
event: event:
exclude: exclude:
- pull_request - 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 image: plugins/docker
settings: settings:
username: username:
@ -46,7 +72,24 @@ steps:
tags: tags:
- ${DRONE_COMMIT_SHA:0:8} - ${DRONE_COMMIT_SHA:0:8}
- ${DRONE_COMMIT_BRANCH} - ${DRONE_COMMIT_BRANCH}
- latest
when: when:
event: event:
exclude: exclude:
- pull_request - 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

View file

@ -1,10 +1,4 @@
############################################################ FROM ubuntu:focal
# 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
ENV DEBIAN_FRONTEND=noninteractive ENV DEBIAN_FRONTEND=noninteractive
@ -14,12 +8,12 @@ RUN apt-get update && \
ruby \ ruby \
ruby-dev \ ruby-dev \
rubygems \ rubygems \
squashfs-tools \
build-essential \ build-essential \
git \ git \
wget \ wget \
rpm \ rpm \
gawk \ gawk \
&& apt-get clean \ && apt-get clean \
&& gem install public_suffix -v 4.0.7 \ && gem install fpm \
&& gem install fpm --no-ri --no-rdoc \
&& rm -rf /var/lib/apt/lists/* /var/tmp/* /tmp/* && rm -rf /var/lib/apt/lists/* /var/tmp/* /tmp/*

View file