feat: add version builds

This commit is contained in:
Jan Christian Grünhage 2017-12-15 03:52:25 +01:00
parent d4d2f19b18
commit 0830895f9c
Signed by untrusted user who does not match committer: jcgruenhage
GPG Key ID: 6594C449C633D10C
2 changed files with 20 additions and 2 deletions

View File

@ -2,7 +2,25 @@ pipeline:
docker:
image: plugins/docker
repo: docker.jcg.re/caddy
build_args:
- BRANCH=tags/${CADDY_VERSION}
registry: docker.jcg.re
secrets: [ docker_username, docker_password ]
tags: ${CADDY_VERSION}
docker:
image: plugins/docker
repo: docker.jcg.re/caddy
registry: docker.jcg.re
secrets: [docker_username, docker_password ]
tags: latest
matrix:
CADDY_VERSION:
- v0.10.10
- v0.10.9
- v0.10.8
- v0.10.7
- v0.10.6
- v0.10.5
- v0.10.4

View File

@ -2,7 +2,7 @@ FROM docker.jcg.re/base-alpine
MAINTAINER Jan Christian Grünhage <jan.christian@gruenhage.xyz>
ARG CLONE_URL=github.com/mholt/caddy
ARG BRANCH=tags/v0.10.10
ARG BRANCH
ENV GOPATH=/gopath \
UID=192 \
@ -21,7 +21,7 @@ RUN apk upgrade --update \
&& mkdir -p ${GOPATH}/src/${CLONE_URL} \
&& cd $GOPATH/src/${CLONE_URL} \
&& git clone https://${CLONE_URL} . \
&& git checkout ${BRANCH} \
&& git checkout ${BRANCH:-$(git describe --abbrev=0 --tags)} \
&& cd caddy/caddymain \
&& export LINE="$(grep -n "// This is where other plugins get plugged in (imported)" < run.go | sed 's/^\([0-9]\+\):.*$/\1/')" \
&& head -n ${LINE} run.go > newrun.go \