Switch to go modules (#13)
This commit is contained in:
parent
4995b00f57
commit
577f229ef7
8 changed files with 141 additions and 532 deletions
|
@ -7,22 +7,24 @@ RUN apt-get update && \
|
|||
git wget make && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN wget -q https://dl.google.com/go/go1.10.3.linux-amd64.tar.gz && \
|
||||
tar -xf go1.10.3.linux-amd64.tar.gz && \
|
||||
rm go1.10.3.linux-amd64.tar.gz && \
|
||||
RUN wget -q https://dl.google.com/go/go1.11.5.linux-amd64.tar.gz && \
|
||||
tar -xf go1.11.5.linux-amd64.tar.gz && \
|
||||
rm go1.11.5.linux-amd64.tar.gz && \
|
||||
mv go /usr/local
|
||||
|
||||
ENV GOROOT /usr/local/go
|
||||
ENV GOPATH /go
|
||||
ENV PATH=$GOPATH/bin:$GOROOT/bin:$PATH
|
||||
|
||||
# install dep
|
||||
RUN wget -q https://raw.githubusercontent.com/golang/dep/master/install.sh && \
|
||||
mkdir -p /go/bin && \
|
||||
sh ./install.sh
|
||||
|
||||
RUN go get -u github.com/minio/minio && go install github.com/minio/minio/cmd
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# prewarm go mod cache
|
||||
COPY go.mod .
|
||||
COPY go.sum .
|
||||
RUN go mod download
|
||||
|
||||
ADD test/test.sh /usr/local/bin
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/test.sh"]
|
||||
|
|
|
@ -5,6 +5,4 @@ export MINIO_SECRET_KEY=DSG643HGDS
|
|||
mkdir -p /tmp/minio
|
||||
minio server --quiet /tmp/minio &>/dev/null &
|
||||
sleep 5
|
||||
cd $GOPATH/src/github.com/ctrox/csi-s3
|
||||
if [ ! -d ./vendor ]; then dep ensure -vendor-only; fi
|
||||
go test github.com/ctrox/csi-s3/pkg/s3 -cover
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue