feat: arm64
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Markus Pesch 2021-10-23 17:14:54 +02:00
parent 7c6d57067b
commit 49b727d22b
Signed by: volker.raschek
GPG Key ID: 852BCC170D81A982
5 changed files with 332 additions and 36 deletions

View File

@ -11,7 +11,7 @@ steps:
- name: markdown lint
commands:
- markdownlint *.md
image: docker.io/tmknom/markdownlint:0.23.1
image: docker.io/volkerraschek/markdownlint:0.29.0
resources:
limits:
cpu: 50
@ -41,6 +41,7 @@ trigger:
event:
exclude:
- tag
---
kind: pipeline
type: docker
@ -62,12 +63,10 @@ steps:
from_secret: container_image_registry_user
password:
from_secret: container_image_registry_password
no_cache: true
volumes:
- name: docker_socket
path: /var/run/docker.sock
when:
branch:
- master
- name: notify
image: drillster/drone-email
@ -90,15 +89,22 @@ volumes:
host:
path: /var/run/docker.sock
depends_on:
- linter
trigger:
branch:
- master
event:
exclude:
- tag
- cron
- push
repo:
- volker.raschek/rpm-builder-docker
---
kind: pipeline
type: docker
name: latest-armv7
name: latest-arm-v7
platform:
os: linux
@ -110,15 +116,13 @@ steps:
settings:
dockerfile: Dockerfile
auto_tag: false
tags: latest-armv7
tags: latest-arm-v7
repo: volkerraschek/rpm-builder
username:
from_secret: container_image_registry_user
password:
from_secret: container_image_registry_password
when:
branch:
- master
no_cache: true
- name: notify
image: drillster/drone-email
@ -144,10 +148,76 @@ volumes:
host:
path: /var/run/docker.sock
depends_on:
- linter
trigger:
branch:
- master
event:
exclude:
- tag
- cron
- 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
@ -188,12 +258,231 @@ steps:
depends_on:
- 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:
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
type: kubernetes
@ -237,8 +526,14 @@ steps:
- changed
- failure
depends_on:
- latest-manifest
trigger:
branch:
- master
event:
- cron
- push
repo:
- volker.raschek/rpm-builder
- volker.raschek/rpm-builder-docker

View File

@ -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 MUSL_VERSION=1.2.0
# install dependencies
RUN apk update && \
apk add curl git make musl-dev
RUN set -e && \
apt-get update --yes && \
apt-get install --yes curl git make
# compile rpm-builder
RUN git clone https://github.com/Richterrettich/rpm-builder.git && \
cd rpm-builder && \
git checkout ${RPMBUILDER_VERSION} && \
make build_linux && echo $PWD
# compile musl and rpm-builder
RUN set -e && \
git clone -b ${RPMBUILDER_VERSION} https://github.com/Richterrettich/rpm-builder.git /rpm-builder && \
make --directory /rpm-builder build
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" ]

View File

@ -1,7 +1,7 @@
# CONTAINER_RUNTIME
# 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?=$(shell which docker)
CONTAINER_RUNTIME?=$(shell which podman)
# RPMBUILDER_IMAGE_REGISTRY_NAME
# Defines the name of the new container to be built using several variables.

View File

@ -1,4 +0,0 @@
version: "3"
services:
network-tools:
image: volkerraschek/rpm-builder:latest

View File

@ -8,12 +8,18 @@ tags:
{{/if}}
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:
architecture: amd64
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:
architecture: arm64
os: linux