mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00

Update to Go 1.12.5 testing. Remove deprecated unused and gosimple pacakges, and mask staticcheck 1006. Also, fix unconvert errors related to unnecessary type conversions and following staticcheck errors: - remove redundant return statements - use for range instead of for select - use time.Since instead of time.Now().Sub - omit comparison to bool constant - replace T.Fatal and T.Fatalf in tests with T.Error and T.Fatalf respectively because the goroutine calls T.Fatal must be called in the same goroutine as the test - fix error strings that should not be capitalized - use sort.Strings(...) instead of sort.Sort(sort.StringSlice(...)) - use he status code of Canceled instead of grpc.ErrClientConnClosing which is deprecated - use use status.Errorf instead of grpc.Errorf which is deprecated Related #10528 #10438
59 lines
1.6 KiB
Docker
59 lines
1.6 KiB
Docker
FROM ubuntu:18.04
|
|
|
|
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
|
|
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
|
|
|
|
RUN apt-get -y update \
|
|
&& apt-get -y install \
|
|
build-essential \
|
|
gcc \
|
|
apt-utils \
|
|
pkg-config \
|
|
software-properties-common \
|
|
apt-transport-https \
|
|
libssl-dev \
|
|
sudo \
|
|
bash \
|
|
curl \
|
|
wget \
|
|
tar \
|
|
git \
|
|
netcat \
|
|
libaspell-dev \
|
|
libhunspell-dev \
|
|
hunspell-en-us \
|
|
aspell-en \
|
|
shellcheck \
|
|
&& apt-get -y update \
|
|
&& apt-get -y upgrade \
|
|
&& apt-get -y autoremove \
|
|
&& apt-get -y autoclean
|
|
|
|
ENV GOROOT /usr/local/go
|
|
ENV GOPATH /go
|
|
ENV PATH ${GOPATH}/bin:${GOROOT}/bin:${PATH}
|
|
ENV GO_VERSION REPLACE_ME_GO_VERSION
|
|
ENV GO_DOWNLOAD_URL https://storage.googleapis.com/golang
|
|
RUN rm -rf ${GOROOT} \
|
|
&& curl -s ${GO_DOWNLOAD_URL}/go${GO_VERSION}.linux-amd64.tar.gz | tar -v -C /usr/local/ -xz \
|
|
&& mkdir -p ${GOPATH}/src ${GOPATH}/bin \
|
|
&& go version
|
|
|
|
RUN mkdir -p ${GOPATH}/src/go.etcd.io/etcd
|
|
WORKDIR ${GOPATH}/src/go.etcd.io/etcd
|
|
|
|
ADD ./scripts/install-marker.sh /tmp/install-marker.sh
|
|
|
|
RUN go get -v -u -tags spell github.com/chzchzchz/goword \
|
|
&& go get -v -u github.com/coreos/license-bill-of-materials \
|
|
&& go get -v -u github.com/mgechev/revive \
|
|
&& go get -v -u github.com/mdempsky/unconvert \
|
|
&& go get -v -u mvdan.cc/unparam \
|
|
&& go get -v -u honnef.co/go/tools/cmd/staticcheck \
|
|
&& go get -v -u github.com/gyuho/gocovmerge \
|
|
&& go get -v -u github.com/gordonklaus/ineffassign \
|
|
&& go get -v -u github.com/alexkohler/nakedret \
|
|
&& /tmp/install-marker.sh amd64 \
|
|
&& rm -f /tmp/install-marker.sh \
|
|
&& curl -s https://codecov.io/bash >/codecov \
|
|
&& chmod 700 /codecov |