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
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
- 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

View file

@ -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/*

View file