From 93538a2659312012c3280859c0ddf507b6a530eb Mon Sep 17 00:00:00 2001 From: Mark Bates Date: Thu, 20 Sep 2018 12:04:43 -0400 Subject: [PATCH] makes sure that both Dockerfile.build and Dockerfile get the latest (#1313) package versions for their builds --- Dockerfile | 6 +----- Dockerfile.build | 14 ++------------ Makefile | 6 +++++- 3 files changed, 8 insertions(+), 18 deletions(-) diff --git a/Dockerfile b/Dockerfile index 857b32f44..3ba2334b5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,9 +15,6 @@ ARG TRAVIS_TAG RUN buffalo version -RUN go get -u github.com/alecthomas/gometalinter -RUN gometalinter --install - ENV BP=$GOPATH/src/github.com/gobuffalo/buffalo RUN rm $(which buffalo) @@ -26,8 +23,7 @@ RUN mkdir -p $BP WORKDIR $BP COPY . . -RUN go get github.com/gobuffalo/buffalo-pop -RUN make deps +RUN make ci-deps RUN make install RUN gometalinter --vendor --deadline=5m ./... --skip=internal diff --git a/Dockerfile.build b/Dockerfile.build index 1ea3dfd20..7f76d5c28 100644 --- a/Dockerfile.build +++ b/Dockerfile.build @@ -1,7 +1,7 @@ FROM golang:latest EXPOSE 3000 ENV BP=$GOPATH/src/github.com/gobuffalo/buffalo -RUN go version && go get -v -u github.com/markbates/deplist/deplist +RUN go version RUN curl -sL https://deb.nodesource.com/setup_8.x | bash \ && sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" >> /etc/apt/sources.list.d/pgdg.list' \ @@ -14,19 +14,10 @@ RUN service postgresql start && \ su -c "psql -c \"ALTER USER postgres WITH PASSWORD 'postgres';\"" - postgres RUN go get -u github.com/golang/dep/cmd/dep \ -&& go get -v -u github.com/gobuffalo/makr \ -&& go get -v -u github.com/gobuffalo/packr \ -&& go get -v -u github.com/gobuffalo/tags \ && go get -v -u github.com/gobuffalo/pop \ -&& go get -v -u github.com/gobuffalo/x/... \ -&& go get -v -u github.com/mattn/go-sqlite3 \ && go get -v -u github.com/markbates/filetest \ && go get -v -u github.com/markbates/grift \ -&& go get -v -u github.com/markbates/inflect \ && go get -v -u github.com/markbates/refresh \ -&& go get -v -u github.com/gobuffalo/httptest \ -&& go get -v -u github.com/gorilla/sessions \ -&& go get -v -u golang.org/x/vgo \ && go get -u github.com/alecthomas/gometalinter \ && gometalinter --install @@ -38,8 +29,7 @@ RUN npm install -g --no-progress yarn \ RUN rm -rfv $BP && mkdir -p $BP WORKDIR $BP COPY . . -RUN make deps && make install - +RUN make ci-deps && make install # cache yarn packages to an offline mirror so they're faster to load. hopefully. RUN grep -v '{{' ./generators/assets/webpack/templates/package.json.tmpl > package.json \ diff --git a/Makefile b/Makefile index 2281e9ac7..0ce8b802b 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,11 @@ test: packr $(GO_BIN) test -tags ${TAGS} ./... -ci-test: deps +ci-deps: + $(GO_BIN) get github.com/gobuffalo/packr/packr + $(GO_BIN) get -tags ${TAGS} -t -u -v ./... + +ci-test: ci-deps docker build . --no-cache lint: