storj/Dockerfile.jenkins
Egon Elbre edf8318c0e
jenkins: update to golangci-lint 1.21.0 (#3289)
* jenkins: update to golint-1.21.0
* don't use underscores in var
* make handles private to satisfy linter

lib\uplinkc\universe.go:32:39: exported method Add returns unexported type storj.io/storj/lib/uplinkc._Ctype_long, which can be annoying to use (golint)
   func (m *Universe) Add(x interface{}) Handle {

* disable wsl explicitly
2019-10-17 10:42:22 +03:00

45 lines
1.9 KiB
Docker

FROM golang:1.13.1
# Postgres
RUN curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ buster-pgdg main" | tee /etc/apt/sources.list.d/pgdg.list
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash -
RUN apt-get update && apt-get install -y -qq postgresql-11 redis-server unzip libuv1-dev libjson-c-dev nettle-dev nodejs
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.21.0
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 28 minutes, and forcefully close at 30 minutes.
# This is to prevent Jenkins collecting cats.
ENTRYPOINT ["timeout", "-k30m", "28m"]