You've already forked build-image
Compare commits
2 Commits
4ed6abb406
...
v0.1.0
Author | SHA1 | Date | |
---|---|---|---|
fe9c11f3b5
|
|||
57d2cc6440
|
193
.drone.yml
193
.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,10 +41,11 @@ trigger:
|
|||||||
event:
|
event:
|
||||||
exclude:
|
exclude:
|
||||||
- tag
|
- tag
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
name: build
|
name: latest-amd64
|
||||||
|
|
||||||
platform:
|
platform:
|
||||||
os: linux
|
os: linux
|
||||||
@ -52,42 +53,128 @@ platform:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build
|
- name: build
|
||||||
image: docker.io/volkerraschek/build-image:latest
|
image: plugins/docker
|
||||||
commands:
|
settings:
|
||||||
- make container-image/build CONTAINER_RUNTIME=docker
|
dockerfile: Dockerfile
|
||||||
volumes:
|
auto_tag: false
|
||||||
- name: docker_socket
|
tags: latest-amd64
|
||||||
path: /var/run/docker.sock
|
repo: volkerraschek/build-image
|
||||||
when:
|
username:
|
||||||
branch:
|
from_secret: container_image_registry_user
|
||||||
- master
|
password:
|
||||||
|
|
||||||
- name: push
|
|
||||||
image: docker.io/volkerraschek/build-image:latest
|
|
||||||
commands:
|
|
||||||
- make container-image/push CONTAINER_RUNTIME=docker
|
|
||||||
environment:
|
|
||||||
BIND9_IMAGE_REGISTRY_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
|
||||||
|
|
||||||
|
- 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:
|
when:
|
||||||
|
status:
|
||||||
|
- changed
|
||||||
|
- failure
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- name: docker_socket
|
||||||
|
host:
|
||||||
|
path: /var/run/docker.sock
|
||||||
|
|
||||||
|
depends_on:
|
||||||
|
- linter
|
||||||
|
|
||||||
|
trigger:
|
||||||
branch:
|
branch:
|
||||||
- master
|
- master
|
||||||
|
event:
|
||||||
|
- cron
|
||||||
|
- push
|
||||||
repo:
|
repo:
|
||||||
- volker.raschek/build-image
|
- volker.raschek/build-image
|
||||||
|
|
||||||
- name: delete
|
---
|
||||||
image: docker.io/volkerraschek/build-image:latest
|
kind: pipeline
|
||||||
commands:
|
type: kubernetes
|
||||||
- make container-image/delete CONTAINER_RUNTIME=docker
|
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:
|
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
|
||||||
@ -112,8 +199,56 @@ volumes:
|
|||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
event:
|
event:
|
||||||
exclude:
|
|
||||||
- tag
|
- 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
|
kind: pipeline
|
||||||
type: kubernetes
|
type: kubernetes
|
||||||
@ -157,8 +292,14 @@ steps:
|
|||||||
- changed
|
- changed
|
||||||
- failure
|
- failure
|
||||||
|
|
||||||
|
depends_on:
|
||||||
|
- tagged-manifest
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
|
branch:
|
||||||
|
- master
|
||||||
event:
|
event:
|
||||||
|
- cron
|
||||||
- push
|
- push
|
||||||
repo:
|
repo:
|
||||||
- volker.raschek/build-image
|
- volker.raschek/build-image
|
||||||
|
11
Dockerfile
11
Dockerfile
@ -12,12 +12,14 @@ RUN pacman --sync --refresh --noconfirm --sysupgrade \
|
|||||||
which \
|
which \
|
||||||
zip
|
zip
|
||||||
|
|
||||||
|
# execute local files
|
||||||
COPY installation-scripts /tmp/installation-scripts
|
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
|
# Install PKGs from own repo
|
||||||
RUN /tmp/installation-scripts/00-pacman-mirror.sh
|
|
||||||
RUN pacman --sync --refresh --noconfirm --sysupgrade \
|
RUN pacman --sync --refresh --noconfirm --sysupgrade \
|
||||||
docker-pushrm \
|
|
||||||
oracle-instantclient-basic \
|
oracle-instantclient-basic \
|
||||||
oracle-instantclient-jdbc \
|
oracle-instantclient-jdbc \
|
||||||
oracle-instantclient-odbc \
|
oracle-instantclient-odbc \
|
||||||
@ -26,9 +28,4 @@ RUN pacman --sync --refresh --noconfirm --sysupgrade \
|
|||||||
oracle-instantclient-tools \
|
oracle-instantclient-tools \
|
||||||
rpm-builder
|
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
|
WORKDIR /workspace
|
2
Makefile
2
Makefile
@ -36,7 +36,7 @@ container-image/delete:
|
|||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
PHONY+=container-image/push
|
PHONY+=container-image/push
|
||||||
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}
|
${CONTAINER_RUNTIME} push ${BUILD_IMAGE_FULLY_QUALIFIED}
|
||||||
|
|
||||||
# PHONY
|
# PHONY
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
cat > /etc/pacman.d/gnupg/dirmngr.conf <<EOF
|
cat > /etc/pacman.d/gnupg/dirmngr.conf <<EOF
|
||||||
keyserver hkps://hkps.pool.sks-keyservers.net:443
|
keyserver hkps://hkps.pool.sks-keyservers.net:443
|
||||||
keyserver hkp://pool.sks-keyservers.net:80
|
keyserver hkp://pool.sks-keyservers.net:80
|
||||||
@ -7,19 +9,17 @@ EOF
|
|||||||
|
|
||||||
# Initialize pacman-key ring
|
# Initialize pacman-key ring
|
||||||
pacman-key --init
|
pacman-key --init
|
||||||
pacman-key --refresh-keys
|
# pacman-key --refresh-keys
|
||||||
|
|
||||||
# Add GPG Key
|
|
||||||
pacman-key --recv-keys 9B146D11A9ED6CA7E279EB1A852BCC170D81A982
|
|
||||||
pacman-key --lsign 9B146D11A9ED6CA7E279EB1A852BCC170D81A982
|
|
||||||
|
|
||||||
# Add additional pacman mirrors
|
# Add additional pacman mirrors
|
||||||
cat >> /etc/pacman.conf <<EOF
|
cat >> /etc/pacman.conf <<EOF
|
||||||
|
|
||||||
[any]
|
[any]
|
||||||
|
SigLevel = Optional TrustAll
|
||||||
Server = https://aur.cryptic.systems/any/
|
Server = https://aur.cryptic.systems/any/
|
||||||
|
|
||||||
[x86_64]
|
[x86_64]
|
||||||
|
SigLevel = Optional TrustAll
|
||||||
Server = https://aur.cryptic.systems/x86_64/
|
Server = https://aur.cryptic.systems/x86_64/
|
||||||
|
|
||||||
[oracle]
|
[oracle]
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
go get -u github.com/go-bindata/go-bindata/...
|
|
14
manifest.tmpl
Normal file
14
manifest.tmpl
Normal 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
|
Reference in New Issue
Block a user