This commit is contained in:
parent
7c6d57067b
commit
49b727d22b
327
.drone.yml
327
.drone.yml
@ -11,7 +11,7 @@ steps:
|
|||||||
- name: markdown lint
|
- name: markdown lint
|
||||||
commands:
|
commands:
|
||||||
- markdownlint *.md
|
- markdownlint *.md
|
||||||
image: docker.io/tmknom/markdownlint:0.23.1
|
image: docker.io/volkerraschek/markdownlint:0.29.0
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
cpu: 50
|
cpu: 50
|
||||||
@ -41,6 +41,7 @@ trigger:
|
|||||||
event:
|
event:
|
||||||
exclude:
|
exclude:
|
||||||
- tag
|
- tag
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
@ -62,12 +63,10 @@ steps:
|
|||||||
from_secret: container_image_registry_user
|
from_secret: container_image_registry_user
|
||||||
password:
|
password:
|
||||||
from_secret: container_image_registry_password
|
from_secret: container_image_registry_password
|
||||||
|
no_cache: true
|
||||||
volumes:
|
volumes:
|
||||||
- name: docker_socket
|
- name: docker_socket
|
||||||
path: /var/run/docker.sock
|
path: /var/run/docker.sock
|
||||||
when:
|
|
||||||
branch:
|
|
||||||
- master
|
|
||||||
|
|
||||||
- name: notify
|
- name: notify
|
||||||
image: drillster/drone-email
|
image: drillster/drone-email
|
||||||
@ -90,15 +89,22 @@ volumes:
|
|||||||
host:
|
host:
|
||||||
path: /var/run/docker.sock
|
path: /var/run/docker.sock
|
||||||
|
|
||||||
|
depends_on:
|
||||||
|
- linter
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
|
branch:
|
||||||
|
- master
|
||||||
event:
|
event:
|
||||||
exclude:
|
- cron
|
||||||
- tag
|
- push
|
||||||
|
repo:
|
||||||
|
- volker.raschek/rpm-builder-docker
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
name: latest-armv7
|
name: latest-arm-v7
|
||||||
|
|
||||||
platform:
|
platform:
|
||||||
os: linux
|
os: linux
|
||||||
@ -110,15 +116,13 @@ steps:
|
|||||||
settings:
|
settings:
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
auto_tag: false
|
auto_tag: false
|
||||||
tags: latest-armv7
|
tags: latest-arm-v7
|
||||||
repo: volkerraschek/rpm-builder
|
repo: volkerraschek/rpm-builder
|
||||||
username:
|
username:
|
||||||
from_secret: container_image_registry_user
|
from_secret: container_image_registry_user
|
||||||
password:
|
password:
|
||||||
from_secret: container_image_registry_password
|
from_secret: container_image_registry_password
|
||||||
when:
|
no_cache: true
|
||||||
branch:
|
|
||||||
- master
|
|
||||||
|
|
||||||
- name: notify
|
- name: notify
|
||||||
image: drillster/drone-email
|
image: drillster/drone-email
|
||||||
@ -144,10 +148,76 @@ volumes:
|
|||||||
host:
|
host:
|
||||||
path: /var/run/docker.sock
|
path: /var/run/docker.sock
|
||||||
|
|
||||||
|
depends_on:
|
||||||
|
- linter
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
|
branch:
|
||||||
|
- master
|
||||||
event:
|
event:
|
||||||
exclude:
|
- cron
|
||||||
- tag
|
- push
|
||||||
|
repo:
|
||||||
|
- volker.raschek/rpm-builder-docker
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: latest-arm64-v8
|
||||||
|
|
||||||
|
platform:
|
||||||
|
os: linux
|
||||||
|
arch: arm64
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: build
|
||||||
|
image: plugins/docker
|
||||||
|
settings:
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
auto_tag: false
|
||||||
|
tags: latest-arm64-v8
|
||||||
|
repo: volkerraschek/rpm-builder
|
||||||
|
username:
|
||||||
|
from_secret: container_image_registry_user
|
||||||
|
password:
|
||||||
|
from_secret: container_image_registry_password
|
||||||
|
no_cache: true
|
||||||
|
|
||||||
|
- name: notify
|
||||||
|
image: drillster/drone-email
|
||||||
|
environment:
|
||||||
|
PLUGIN_HOST:
|
||||||
|
from_secret: smtp_host
|
||||||
|
PLUGIN_USERNAME:
|
||||||
|
from_secret: smtp_username
|
||||||
|
PLUGIN_PASSWORD:
|
||||||
|
from_secret: smtp_password
|
||||||
|
PLUGIN_FROM:
|
||||||
|
from_secret: smtp_mail_address
|
||||||
|
volumes:
|
||||||
|
- name: docker_socket
|
||||||
|
path: /var/run/docker.sock
|
||||||
|
when:
|
||||||
|
status:
|
||||||
|
- changed
|
||||||
|
- failure
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- name: docker_socket
|
||||||
|
host:
|
||||||
|
path: /var/run/docker.sock
|
||||||
|
|
||||||
|
depends_on:
|
||||||
|
- linter
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
branch:
|
||||||
|
- master
|
||||||
|
event:
|
||||||
|
- cron
|
||||||
|
- push
|
||||||
|
repo:
|
||||||
|
- volker.raschek/rpm-builder-docker
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
@ -188,12 +258,231 @@ steps:
|
|||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- latest-amd64
|
- latest-amd64
|
||||||
- latest-armv7
|
- latest-arm-v7
|
||||||
|
- latest-arm64-v8
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
branch:
|
||||||
|
- master
|
||||||
|
event:
|
||||||
|
- cron
|
||||||
|
- push
|
||||||
|
repo:
|
||||||
|
- volker.raschek/rpm-builder-docker
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: tagged-amd64
|
||||||
|
|
||||||
|
platform:
|
||||||
|
os: linux
|
||||||
|
arch: amd64
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: build
|
||||||
|
image: plugins/docker
|
||||||
|
settings:
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
auto_tag: true
|
||||||
|
auto_tag_suffix: amd64
|
||||||
|
repo: volkerraschek/rpm-builder
|
||||||
|
username:
|
||||||
|
from_secret: container_image_registry_user
|
||||||
|
password:
|
||||||
|
from_secret: container_image_registry_password
|
||||||
|
build_args:
|
||||||
|
- RPMBUILDER_VERSION=${DRONE_TAG}
|
||||||
|
no_cache: true
|
||||||
|
volumes:
|
||||||
|
- name: docker_socket
|
||||||
|
path: /var/run/docker.sock
|
||||||
|
|
||||||
|
- name: notify
|
||||||
|
image: drillster/drone-email
|
||||||
|
environment:
|
||||||
|
PLUGIN_HOST:
|
||||||
|
from_secret: smtp_host
|
||||||
|
PLUGIN_USERNAME:
|
||||||
|
from_secret: smtp_username
|
||||||
|
PLUGIN_PASSWORD:
|
||||||
|
from_secret: smtp_password
|
||||||
|
PLUGIN_FROM:
|
||||||
|
from_secret: smtp_mail_address
|
||||||
|
when:
|
||||||
|
status:
|
||||||
|
- changed
|
||||||
|
- failure
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- name: docker_socket
|
||||||
|
host:
|
||||||
|
path: /var/run/docker.sock
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
event:
|
event:
|
||||||
exclude:
|
|
||||||
- tag
|
- tag
|
||||||
|
repo:
|
||||||
|
- volker.raschek/rpm-builder-docker
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: tagged-arm-v7
|
||||||
|
|
||||||
|
platform:
|
||||||
|
os: linux
|
||||||
|
arch: arm
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: build
|
||||||
|
image: plugins/docker
|
||||||
|
settings:
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
auto_tag: true
|
||||||
|
auto_tag_suffix: arm-v7
|
||||||
|
repo: volkerraschek/rpm-builder
|
||||||
|
username:
|
||||||
|
from_secret: container_image_registry_user
|
||||||
|
password:
|
||||||
|
from_secret: container_image_registry_password
|
||||||
|
build_args:
|
||||||
|
- RPMBUILDER_VERSION=${DRONE_TAG}
|
||||||
|
no_cache: true
|
||||||
|
volumes:
|
||||||
|
- name: docker_socket
|
||||||
|
path: /var/run/docker.sock
|
||||||
|
|
||||||
|
- name: notify
|
||||||
|
image: drillster/drone-email
|
||||||
|
environment:
|
||||||
|
PLUGIN_HOST:
|
||||||
|
from_secret: smtp_host
|
||||||
|
PLUGIN_USERNAME:
|
||||||
|
from_secret: smtp_username
|
||||||
|
PLUGIN_PASSWORD:
|
||||||
|
from_secret: smtp_password
|
||||||
|
PLUGIN_FROM:
|
||||||
|
from_secret: smtp_mail_address
|
||||||
|
when:
|
||||||
|
status:
|
||||||
|
- changed
|
||||||
|
- failure
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- name: docker_socket
|
||||||
|
host:
|
||||||
|
path: /var/run/docker.sock
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
event:
|
||||||
|
- tag
|
||||||
|
repo:
|
||||||
|
- volker.raschek/rpm-builder-docker
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: tagged-arm64-v8
|
||||||
|
|
||||||
|
platform:
|
||||||
|
os: linux
|
||||||
|
arch: arm64
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: build
|
||||||
|
image: plugins/docker
|
||||||
|
settings:
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
auto_tag: true
|
||||||
|
auto_tag_suffix: arm64-v8
|
||||||
|
repo: volkerraschek/rpm-builder
|
||||||
|
username:
|
||||||
|
from_secret: container_image_registry_user
|
||||||
|
password:
|
||||||
|
from_secret: container_image_registry_password
|
||||||
|
build_args:
|
||||||
|
- RPMBUILDER_VERSION=${DRONE_TAG}
|
||||||
|
no_cache: true
|
||||||
|
volumes:
|
||||||
|
- name: docker_socket
|
||||||
|
path: /var/run/docker.sock
|
||||||
|
|
||||||
|
- name: notify
|
||||||
|
image: drillster/drone-email
|
||||||
|
environment:
|
||||||
|
PLUGIN_HOST:
|
||||||
|
from_secret: smtp_host
|
||||||
|
PLUGIN_USERNAME:
|
||||||
|
from_secret: smtp_username
|
||||||
|
PLUGIN_PASSWORD:
|
||||||
|
from_secret: smtp_password
|
||||||
|
PLUGIN_FROM:
|
||||||
|
from_secret: smtp_mail_address
|
||||||
|
when:
|
||||||
|
status:
|
||||||
|
- changed
|
||||||
|
- failure
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- name: docker_socket
|
||||||
|
host:
|
||||||
|
path: /var/run/docker.sock
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
event:
|
||||||
|
- tag
|
||||||
|
repo:
|
||||||
|
- volker.raschek/rpm-builder-docker
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: kubernetes
|
||||||
|
name: tagged-manifest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: build-manifest
|
||||||
|
image: plugins/manifest
|
||||||
|
settings:
|
||||||
|
auto_tag: true
|
||||||
|
ignore_missing: true
|
||||||
|
spec: manifest.tmpl
|
||||||
|
username:
|
||||||
|
from_secret: container_image_registry_user
|
||||||
|
password:
|
||||||
|
from_secret: container_image_registry_password
|
||||||
|
|
||||||
|
- name: notify
|
||||||
|
image: docker.io/drillster/drone-email:latest
|
||||||
|
environment:
|
||||||
|
PLUGIN_HOST:
|
||||||
|
from_secret: smtp_host
|
||||||
|
PLUGIN_USERNAME:
|
||||||
|
from_secret: smtp_username
|
||||||
|
PLUGIN_PASSWORD:
|
||||||
|
from_secret: smtp_password
|
||||||
|
PLUGIN_FROM:
|
||||||
|
from_secret: smtp_mail_address
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 50
|
||||||
|
memory: 25M
|
||||||
|
when:
|
||||||
|
status:
|
||||||
|
- changed
|
||||||
|
- failure
|
||||||
|
|
||||||
|
depends_on:
|
||||||
|
- tagged-amd64
|
||||||
|
- tagged-arm-v7
|
||||||
|
- tagged-arm64-v8
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
event:
|
||||||
|
- tag
|
||||||
|
repo:
|
||||||
|
- volker.raschek/rpm-builder-docker
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: kubernetes
|
type: kubernetes
|
||||||
@ -237,8 +526,14 @@ steps:
|
|||||||
- changed
|
- changed
|
||||||
- failure
|
- failure
|
||||||
|
|
||||||
|
depends_on:
|
||||||
|
- latest-manifest
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
|
branch:
|
||||||
|
- master
|
||||||
event:
|
event:
|
||||||
|
- cron
|
||||||
- push
|
- push
|
||||||
repo:
|
repo:
|
||||||
- volker.raschek/rpm-builder
|
- volker.raschek/rpm-builder-docker
|
||||||
|
21
Dockerfile
21
Dockerfile
@ -1,20 +1,19 @@
|
|||||||
FROM docker.io/library/rust:1.54.0-alpine3.13 AS build
|
FROM docker.io/library/rust:slim-buster AS build
|
||||||
|
|
||||||
ARG RPMBUILDER_VERSION=master
|
ARG RPMBUILDER_VERSION=master
|
||||||
ARG MUSL_VERSION=1.2.0
|
|
||||||
|
|
||||||
# install dependencies
|
# install dependencies
|
||||||
RUN apk update && \
|
RUN set -e && \
|
||||||
apk add curl git make musl-dev
|
apt-get update --yes && \
|
||||||
|
apt-get install --yes curl git make
|
||||||
|
|
||||||
# compile rpm-builder
|
# compile musl and rpm-builder
|
||||||
RUN git clone https://github.com/Richterrettich/rpm-builder.git && \
|
RUN set -e && \
|
||||||
cd rpm-builder && \
|
git clone -b ${RPMBUILDER_VERSION} https://github.com/Richterrettich/rpm-builder.git /rpm-builder && \
|
||||||
git checkout ${RPMBUILDER_VERSION} && \
|
make --directory /rpm-builder build
|
||||||
make build_linux && echo $PWD
|
|
||||||
|
|
||||||
FROM docker.io/library/alpine:3.14.2
|
FROM docker.io/library/debian:buster-slim
|
||||||
|
|
||||||
COPY --from=build /rpm-builder/target/x86_64-unknown-linux-musl/release/rpm-builder /usr/bin/rpm-builder
|
COPY --from=build /rpm-builder/target/release/rpm-builder /usr/bin/rpm-builder
|
||||||
|
|
||||||
ENTRYPOINT [ "/usr/bin/rpm-builder" ]
|
ENTRYPOINT [ "/usr/bin/rpm-builder" ]
|
2
Makefile
2
Makefile
@ -1,7 +1,7 @@
|
|||||||
# CONTAINER_RUNTIME
|
# CONTAINER_RUNTIME
|
||||||
# The CONTAINER_RUNTIME variable will be used to specified the path to a
|
# The CONTAINER_RUNTIME variable will be used to specified the path to a
|
||||||
# container runtime. This is needed to start and run a container image.
|
# container runtime. This is needed to start and run a container image.
|
||||||
CONTAINER_RUNTIME?=$(shell which docker)
|
CONTAINER_RUNTIME?=$(shell which podman)
|
||||||
|
|
||||||
# RPMBUILDER_IMAGE_REGISTRY_NAME
|
# RPMBUILDER_IMAGE_REGISTRY_NAME
|
||||||
# Defines the name of the new container to be built using several variables.
|
# Defines the name of the new container to be built using several variables.
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
version: "3"
|
|
||||||
services:
|
|
||||||
network-tools:
|
|
||||||
image: volkerraschek/rpm-builder:latest
|
|
@ -8,12 +8,18 @@ tags:
|
|||||||
{{/if}}
|
{{/if}}
|
||||||
manifests:
|
manifests:
|
||||||
-
|
-
|
||||||
image: volkerraschek/rpm-builder:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{else}}latest{{/if}}-amd64
|
image: volkerraschek/rpm-builder:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}-amd64
|
||||||
platform:
|
platform:
|
||||||
architecture: amd64
|
architecture: amd64
|
||||||
os: linux
|
os: linux
|
||||||
-
|
-
|
||||||
image: volkerraschek/rpm-builder:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{else}}latest{{/if}}-arm64
|
image: volkerraschek/rpm-builder:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}-arm-v7
|
||||||
|
platform:
|
||||||
|
architecture: arm
|
||||||
|
os: linux
|
||||||
|
variant: v7
|
||||||
|
-
|
||||||
|
image: volkerraschek/rpm-builder:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}-arm64-v8
|
||||||
platform:
|
platform:
|
||||||
architecture: arm64
|
architecture: arm64
|
||||||
os: linux
|
os: linux
|
||||||
|
Loading…
Reference in New Issue
Block a user