forked from storj/storj
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.jenkins
43 lines (30 loc) · 1.83 KB
/
Dockerfile.jenkins
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
FROM golang:1.12.7
# Postgres
RUN curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" | tee /etc/apt/sources.list.d/pgdg.list
RUN apt-get update && apt-get install -y -qq postgresql-11 redis-server unzip libuv1-dev libjson-c-dev nettle-dev
RUN rm /etc/postgresql/11/main/pg_hba.conf; \
echo 'local all all trust' >> /etc/postgresql/11/main/pg_hba.conf; \
echo 'host all all 127.0.0.1/8 trust' >> /etc/postgresql/11/main/pg_hba.conf; \
echo 'host all all ::1/128 trust' >> /etc/postgresql/11/main/pg_hba.conf; \
echo 'host all all ::0/0 trust' >> /etc/postgresql/11/main/pg_hba.conf;
RUN echo 'max_connections = 1000' >> /etc/postgresql/11/main/conf.d/connectionlimits.conf
# Tooling
COPY ./scripts/install-awscli.sh /tmp/install-awscli.sh
RUN bash /tmp/install-awscli.sh
ENV PATH "$PATH:/root/bin"
RUN curl -L https://github.com/google/protobuf/releases/download/v3.6.1/protoc-3.6.1-linux-x86_64.zip -o /tmp/protoc.zip
RUN unzip /tmp/protoc.zip -d "$HOME"/protoc
# Linters
RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b ${GOPATH}/bin v1.17.1
RUN go get github.com/ckaznocha/protoc-gen-lint
RUN go get github.com/nilslice/protolock/cmd/protolock
RUN go get github.com/josephspurrier/goversioninfo
RUN go get github.com/loov/leakcheck
# Output formatters
RUN go get github.com/mfridman/tparse
RUN go get github.com/axw/gocov/gocov
RUN go get github.com/AlekSi/gocov-xml
# Set our entrypoint to close after 18 minutes, and forcefully close at 20 minutes.
# This is to prevent Jenkins collecting cats.
ENTRYPOINT ["timeout", "-k20m", "18m"]