Go implementation of the original bash plugin, containing all features

This commit is contained in:
cbrgm 2018-06-12 18:41:04 +02:00
commit 1ec3bbb482
19 changed files with 826 additions and 671 deletions

View file

@ -1,17 +1,22 @@
FROM alpine:latest
LABEL maintainer="chris@cbrgm.de"
LABEL version="latest"
FROM plugins/base:amd64
LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" \
org.label-schema.name="Drone Hugo" \
org.label-schema.vendor="Drone.IO Community" \
org.label-schema.schema-version="1.0"
ARG HUGO_VERSION
ARG HUGO_ARCH
ENV PLUGIN_HUGO_ARCH=$HUGO_ARCH
ENV PLUGIN_HUGO_SHIPPED_VERSION=$HUGO_VERSION
COPY ./drone-hugo.sh /bin/
ADD release/linux/amd64/drone-hugo /bin/
RUN apk update && \
apk --no-cache add git && \
chmod +x bin/drone-hugo.sh && \
chmod +x bin/drone-hugo && \
mkdir /temp/ && \
wget -O- https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_Linux-64bit.tar.gz | tar xz -C /temp/ && \
wget -O- https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_Linux-${HUGO_ARCH}.tar.gz | tar xz -C /temp/ && \
mv /temp/hugo /bin/hugo && \
rm -rf /temp
ENTRYPOINT /bin/sh /bin/drone-hugo.sh
ENTRYPOINT ["/bin/drone-hugo"]