Updated build environment for drone
continuous-integration/drone/push Build was killed Details

This commit is contained in:
Tyler 2019-06-02 16:52:51 -04:00
parent 2b1dfb247a
commit 1017553f08
5 changed files with 74 additions and 38 deletions

65
.drone.yml Normal file
View File

@ -0,0 +1,65 @@
kind: pipeline
name: amd64
platform:
os: linux
arch: amd64
steps:
- name: docker
image: plugins/docker
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: registry.meow.tf/joker/godns
registry: registry.meow.tf
tags:
- amd64-latest
---
kind: pipeline
name: arm64
platform:
os: linux
arch: arm64
steps:
- name: docker
image: plugins/docker
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: registry.meow.tf/joker/godns
registry: registry.meow.tf
tags:
- arm64-latest
---
kind: pipeline
name: manifest
steps:
- name: manifest
image: registry.meow.tf/docker/tools/manifest-tool:amd64-latest
environment:
DOCKER_USERNAME:
from_secret: docker_username
DOCKER_PASSWORD:
from_secret: docker_password
DOCKER_REGISTRY:
from_secret: docker_registry
commands:
- docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD $DOCKER_REGISTRY
- /usr/bin/manifest-tool push from-spec manifest.yml
depends_on:
- amd64
- arm64
image_pull_secrets:
- dockerconfigjson

View File

@ -1,6 +1,9 @@
FROM arm32v6/alpine
FROM golang:alpine AS build-env
COPY tmp/qemu-arm-static /usr/bin/qemu-arm-static
ADD . /src
RUN cd /src && go get -d && go build -o godns
FROM alpine
MAINTAINER Tyler Stuyfzand <tyler@tystuyfzand.com>
@ -11,5 +14,5 @@ ENTRYPOINT ["/sbin/tini", "-g", "--"]
CMD ["godns"]
COPY etc/godns.example.conf /etc/godns.conf
COPY godns-arm /usr/local/bin/godns
COPY --from=build-env /src/godns /usr/local/bin/godns
RUN chmod +x /usr/local/bin/godns

View File

@ -1,13 +0,0 @@
FROM alpine:3.7
MAINTAINER Tyler Stuyfzand <tyler@tystuyfzand.com>
EXPOSE 53
RUN apk --no-cache add tini
ENTRYPOINT ["/sbin/tini", "-g", "--"]
CMD ["godns"]
COPY etc/godns.example.conf /etc/godns.conf
COPY godns /usr/local/bin/godns
RUN chmod +x /usr/local/bin/godns

View File

@ -1,15 +0,0 @@
FROM arm64v8/alpine
COPY tmp/qemu-aarch64-static /usr/bin/qemu-aarch64-static
MAINTAINER Tyler Stuyfzand <tyler@tystuyfzand.com>
EXPOSE 53
RUN apk --no-cache add tini
ENTRYPOINT ["/sbin/tini", "-g", "--"]
CMD ["godns"]
COPY etc/godns.example.conf /etc/godns.conf
COPY godns-arm64 /usr/local/bin/godns
RUN chmod +x /usr/local/bin/godns

View File

@ -1,14 +1,10 @@
image: registry.git.meow.tf/tyler/godns:latest
image: registry.git.meow.tf/joker/godns:latest
manifests:
- image: registry.git.meow.tf/tyler/godns:amd64-latest
- image: registry.git.meow.tf/joker/godns:amd64-latest
platform:
architecture: amd64
os: linux
- image: registry.git.meow.tf/tyler/godns:arm-latest
platform:
architecture: arm
os: linux
- image: registry.git.meow.tf/tyler/godns:arm64-latest
- image: registry.git.meow.tf/joker/godns:arm64-latest
platform:
architecture: arm64
os: linux