Skip to content

Commit

Permalink
Merge pull request #12 from aptalca/drone
Browse files Browse the repository at this point in the history
Drone.io
  • Loading branch information
aptalca authored Mar 21, 2019
2 parents d33a3f2 + 3a6e853 commit bfad4e8
Show file tree
Hide file tree
Showing 5 changed files with 195 additions and 1 deletion.
105 changes: 105 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
---
kind: pipeline
name: linux-amd64

platform:
os: linux
arch: amd64

steps:
- name: publish_image
image: plugins/docker
settings:
auto_tag: true
auto_tag_suffix: linux-amd64
dockerfile: Dockerfile
password:
from_secret: docker_password
repo: aptalca/zap2xml
username:
from_secret: docker_username
when:
event:
- push
- tag

---
kind: pipeline
name: linux-arm

platform:
os: linux
arch: arm

steps:
- name: publish_image
image: plugins/docker
settings:
auto_tag: true
auto_tag_suffix: linux-arm
dockerfile: Dockerfile.arm
password:
from_secret: docker_password
repo: aptalca/zap2xml
username:
from_secret: docker_username
when:
event:
- push
- tag

---
kind: pipeline
name: linux-arm64

platform:
os: linux
arch: arm64

steps:
- name: publish_image
image: plugins/docker
settings:
auto_tag: true
auto_tag_suffix: linux-arm64
dockerfile: Dockerfile.aarch64
password:
from_secret: docker_password
repo: aptalca/zap2xml
username:
from_secret: docker_username
when:
event:
- push
- tag

---
kind: pipeline
name: manifest

platform:
os: linux
arch: amd64

steps:
- name: server
image: plugins/manifest
settings:
auto_tag: true
ignore_missing: true
password:
from_secret: docker_password
spec: manifest.tmpl
username:
from_secret: docker_username
when:
event:
- push
- tag

depends_on:
- linux-amd64
- linux-arm
- linux-arm64

...
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM lsiobase/alpine:3.7
FROM lsiobase/alpine:3.9
MAINTAINER aptalca

# environment settings
Expand Down
32 changes: 32 additions & 0 deletions Dockerfile.aarch64
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
FROM lsiobase/alpine.arm64:3.9
MAINTAINER aptalca

# environment settings
ENV S6_BEHAVIOUR_IF_STAGE2_FAILS=2

# install packages
RUN \
apk add --no-cache \
logrotate \
nano \
perl-compress-raw-zlib \
perl-gd \
perl-html-parser \
perl-http-cookies \
perl-json \
perl-json-maybexs \
perl-lwp-protocol-https \
perl-lwp-useragent-determined \
wget && \
apk add --no-cache \
--repository http://nl.alpinelinux.org/alpine/edge/testing \
perl-json-xs && \

# fix logrotate
sed -i "s#/var/log/messages {}.*# #g" /etc/logrotate.conf

# copy local files
COPY root/ /

# ports and volumes
VOLUME /config
32 changes: 32 additions & 0 deletions Dockerfile.arm
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
FROM lsiobase/alpine.armhf:3.9
MAINTAINER aptalca

# environment settings
ENV S6_BEHAVIOUR_IF_STAGE2_FAILS=2

# install packages
RUN \
apk add --no-cache \
logrotate \
nano \
perl-compress-raw-zlib \
perl-gd \
perl-html-parser \
perl-http-cookies \
perl-json \
perl-json-maybexs \
perl-lwp-protocol-https \
perl-lwp-useragent-determined \
wget && \
apk add --no-cache \
--repository http://nl.alpinelinux.org/alpine/edge/testing \
perl-json-xs && \

# fix logrotate
sed -i "s#/var/log/messages {}.*# #g" /etc/logrotate.conf

# copy local files
COPY root/ /

# ports and volumes
VOLUME /config
25 changes: 25 additions & 0 deletions manifest.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
image: aptalca/zap2xml:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
{{#if build.tags}}
tags:
{{#each build.tags}}
- {{this}}
{{/each}}
{{/if}}
manifests:
-
image: drone/drone:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64
platform:
architecture: amd64
os: linux
-
image: drone/drone:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64
platform:
architecture: arm64
os: linux
variant: v8
-
image: drone/drone:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm
platform:
architecture: arm
os: linux
variant: v7

0 comments on commit bfad4e8

Please sign in to comment.