Compare commits

2 Commits

Author SHA1 Message Date
fe9c11f3b5 fix(ci): build image via docker plugin
Some checks reported errors
continuous-integration/drone/push Build was killed
2021-10-12 21:32:23 +02:00
57d2cc6440 fix: remove docker-pushrm
Some checks failed
continuous-integration/drone/push Build is failing
2021-09-01 17:28:25 +02:00
6 changed files with 197 additions and 48 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,10 +41,11 @@ trigger:
event:
exclude:
- tag
---
kind: pipeline
type: docker
name: build
name: latest-amd64
platform:
os: linux
@ -52,42 +53,128 @@ platform:
steps:
- name: build
image: docker.io/volkerraschek/build-image:latest
commands:
- make container-image/build CONTAINER_RUNTIME=docker
volumes:
- name: docker_socket
path: /var/run/docker.sock
when:
branch:
- master
- name: push
image: docker.io/volkerraschek/build-image:latest
commands:
- make container-image/push CONTAINER_RUNTIME=docker
environment:
BIND9_IMAGE_REGISTRY_PASSWORD:
image: plugins/docker
settings:
dockerfile: Dockerfile
auto_tag: false
tags: latest-amd64
repo: volkerraschek/build-image
username:
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
- 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
depends_on:
- linter
trigger:
branch:
- master
event:
- cron
- push
repo:
- volker.raschek/build-image
- name: delete
image: docker.io/volkerraschek/build-image:latest
commands:
- make container-image/delete CONTAINER_RUNTIME=docker
---
kind: pipeline
type: kubernetes
name: latest-manifest
steps:
- name: build-manifest
image: plugins/manifest
settings:
auto_tag: false
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:
- latest-amd64
trigger:
branch:
- master
event:
- cron
- push
repo:
- volker.raschek/build-image
---
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/build-image
username:
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
@ -112,8 +199,56 @@ volumes:
trigger:
event:
exclude:
- tag
repo:
- volker.raschek/build-image
---
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
trigger:
event:
- tag
repo:
- volker.raschek/build-image
---
kind: pipeline
type: kubernetes
@ -157,8 +292,14 @@ steps:
- changed
- failure
depends_on:
- tagged-manifest
trigger:
branch:
- master
event:
- cron
- push
repo:
- volker.raschek/build-image

View File

@ -12,12 +12,14 @@ RUN pacman --sync --refresh --noconfirm --sysupgrade \
which \
zip
# execute local files
COPY installation-scripts /tmp/installation-scripts
RUN for f in {00-pacman-mirror.sh,01-rustup.sh}; do /tmp/installation-scripts/$f; done && \
rm --recursive --force /tmp/installation-scripts
ENV PATH="/root/.cargo/bin:/root/go/bin:${PATH}"
# Install PKGs from own repo
RUN /tmp/installation-scripts/00-pacman-mirror.sh
RUN pacman --sync --refresh --noconfirm --sysupgrade \
docker-pushrm \
oracle-instantclient-basic \
oracle-instantclient-jdbc \
oracle-instantclient-odbc \
@ -26,9 +28,4 @@ RUN pacman --sync --refresh --noconfirm --sysupgrade \
oracle-instantclient-tools \
rpm-builder
ENV PATH="/root/.cargo/bin:/root/go/bin:${PATH}"
RUN for f in {01-rustup.sh,02-go-bindata.sh}; do /tmp/installation-scripts/$f; done && \
rm --recursive --force /tmp/installation-scripts
WORKDIR /workspace

View File

@ -36,7 +36,7 @@ container-image/delete:
# ==============================================================================
PHONY+=container-image/push
container-image/push:
${CONTAINER_RUNTIME} login ${BUILD_IMAGE_REGISTRY_HOST} --username ${BUILD_IMAGE_REGISTRY_USER} --password ${BUILD_IMAGE_REGISTRY_PASSWORD}
echo ${BUILD_IMAGE_REGISTRY_PASSWORD} | ${CONTAINER_RUNTIME} login ${BUILD_IMAGE_REGISTRY_HOST} --username ${BUILD_IMAGE_REGISTRY_USER} --password-stdin
${CONTAINER_RUNTIME} push ${BUILD_IMAGE_FULLY_QUALIFIED}
# PHONY

View File

@ -1,5 +1,7 @@
#!/bin/bash
set -e
cat > /etc/pacman.d/gnupg/dirmngr.conf <<EOF
keyserver hkps://hkps.pool.sks-keyservers.net:443
keyserver hkp://pool.sks-keyservers.net:80
@ -7,19 +9,17 @@ EOF
# Initialize pacman-key ring
pacman-key --init
pacman-key --refresh-keys
# Add GPG Key
pacman-key --recv-keys 9B146D11A9ED6CA7E279EB1A852BCC170D81A982
pacman-key --lsign 9B146D11A9ED6CA7E279EB1A852BCC170D81A982
# pacman-key --refresh-keys
# Add additional pacman mirrors
cat >> /etc/pacman.conf <<EOF
[any]
SigLevel = Optional TrustAll
Server = https://aur.cryptic.systems/any/
[x86_64]
SigLevel = Optional TrustAll
Server = https://aur.cryptic.systems/x86_64/
[oracle]

View File

@ -1,3 +0,0 @@
#!/bin/bash
go get -u github.com/go-bindata/go-bindata/...

14
manifest.tmpl Normal file
View File

@ -0,0 +1,14 @@
image: volkerraschek/build-image:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
{{#if build.tags}}
tags:
{{#each build.tags}}
- {{this}}
{{/each}}
- "latest"
{{/if}}
manifests:
-
image: volkerraschek/build-image:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}-amd64
platform:
architecture: amd64
os: linux