You've already forked build-image
Compare commits
2 Commits
4ed6abb406
...
v0.1.0
Author | SHA1 | Date | |
---|---|---|---|
fe9c11f3b5
|
|||
57d2cc6440
|
205
.drone.yml
205
.drone.yml
@ -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
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
repo:
|
||||
- volker.raschek/build-image
|
||||
|
||||
- name: delete
|
||||
image: docker.io/volkerraschek/build-image:latest
|
||||
commands:
|
||||
- make container-image/delete CONTAINER_RUNTIME=docker
|
||||
- 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
|
||||
|
||||
---
|
||||
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
|
||||
- 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
|
||||
|
11
Dockerfile
11
Dockerfile
@ -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
|
2
Makefile
2
Makefile
@ -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
|
||||
|
@ -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]
|
||||
|
@ -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