Skip to content

Commit

Permalink
Build webhook with stream-command-output support.
Browse files Browse the repository at this point in the history
For the s3import script seems useful to print the output as it happens,
as version 2.8.0 of webhook does not have this functionality we are
applying the PR 549 (adnanh/webhook#549) and
building the binary for alpine.
  • Loading branch information
sto committed Sep 12, 2022
1 parent 452ad19 commit 18a2db3
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
18 changes: 17 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,28 @@
ARG ALPINE_VERSION

FROM golang:alpine AS builder
LABEL maintainer="Sergio Talens-Oliag <[email protected]>"
WORKDIR /go/src/github.com/adnanh/webhook
RUN apk update &&\
apk add --no-cache -t build-deps curl libc-dev gcc libgcc patch &&\
curl -L --silent -o webhook.tar.gz\
https://github.com/adnanh/webhook/archive/2.8.0.tar.gz &&\
tar -xzf webhook.tar.gz --strip 1 &&\
curl -L --silent -o 549.patch\
https://patch-diff.githubusercontent.com/raw/adnanh/webhook/pull/549.patch &&\
patch -p1 < 549.patch &&\
go get -d && \
go build -o /usr/local/bin/webhook

FROM alpine:$ALPINE_VERSION
LABEL maintainer="Sergio Talens-Oliag <[email protected]>"
RUN apk update &&\
apk add --no-cache mailcap nodejs npm util-linux-misc webhook &&\
apk add --no-cache mailcap nodejs npm util-linux-misc &&\
apk add --no-cache s3fs-fuse \
--repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing/ &&\
rm -rf /var/cache/apk/* &&\
npm install --location=global kyso
COPY --from=builder /usr/local/bin/webhook /usr/local/bin/webhook
COPY entrypoint.sh /
COPY hooks/* /webhook/hooks/
EXPOSE 9000
Expand Down
1 change: 1 addition & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ print_s3import_yml() {
- source: 'payload'
envname: 'ORGANIZATION'
name: 'import.organization'
stream-command-output: true
EOF
}

Expand Down

0 comments on commit 18a2db3

Please sign in to comment.