Skip to content

Commit 18a2db3

Browse files
committed
Build webhook with stream-command-output support.
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.
1 parent 452ad19 commit 18a2db3

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

Dockerfile

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,28 @@
11
ARG ALPINE_VERSION
2+
3+
FROM golang:alpine AS builder
4+
LABEL maintainer="Sergio Talens-Oliag <[email protected]>"
5+
WORKDIR /go/src/github.com/adnanh/webhook
6+
RUN apk update &&\
7+
apk add --no-cache -t build-deps curl libc-dev gcc libgcc patch &&\
8+
curl -L --silent -o webhook.tar.gz\
9+
https://github.com/adnanh/webhook/archive/2.8.0.tar.gz &&\
10+
tar -xzf webhook.tar.gz --strip 1 &&\
11+
curl -L --silent -o 549.patch\
12+
https://patch-diff.githubusercontent.com/raw/adnanh/webhook/pull/549.patch &&\
13+
patch -p1 < 549.patch &&\
14+
go get -d && \
15+
go build -o /usr/local/bin/webhook
16+
217
FROM alpine:$ALPINE_VERSION
318
LABEL maintainer="Sergio Talens-Oliag <[email protected]>"
419
RUN apk update &&\
5-
apk add --no-cache mailcap nodejs npm util-linux-misc webhook &&\
20+
apk add --no-cache mailcap nodejs npm util-linux-misc &&\
621
apk add --no-cache s3fs-fuse \
722
--repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing/ &&\
823
rm -rf /var/cache/apk/* &&\
924
npm install --location=global kyso
25+
COPY --from=builder /usr/local/bin/webhook /usr/local/bin/webhook
1026
COPY entrypoint.sh /
1127
COPY hooks/* /webhook/hooks/
1228
EXPOSE 9000

entrypoint.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ print_s3import_yml() {
9999
- source: 'payload'
100100
envname: 'ORGANIZATION'
101101
name: 'import.organization'
102+
stream-command-output: true
102103
EOF
103104
}
104105

0 commit comments

Comments
 (0)