Skip to content

Commit

Permalink
build/all.bash: adjust home directory used in gerrit CI
Browse files Browse the repository at this point in the history
Recent changes in kokoro seem to restrict access to the root directories
other than /workspace. Place all directories we need write permission fo
under /workspace directory. That includes the home directory (where npm
and the vscode test framework store downloaded data and configuration by
default) and the default GOPATH directory ($HOME/go) under which tests
copy test fixtures.

Fixes #833

Change-Id: I85ad64d253df31f782d29ae0fe994945210567cc
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/264877
Trust: Hyang-Ah Hana Kim <[email protected]>
Run-TryBot: Hyang-Ah Hana Kim <[email protected]>
TryBot-Result: kokoro <[email protected]>
Reviewed-by: Robert Findley <[email protected]>
  • Loading branch information
hyangah committed Oct 26, 2020
1 parent 46f249d commit d533d37
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 16 deletions.
9 changes: 7 additions & 2 deletions build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,18 @@ RUN /scratch/build/all.bash setup_env

FROM node:latest

# Prepare a home directory under workspace.
RUN mkdir -p /workspace/vscodego
ENV HOME=/workspace/vscodego

# GO111MODULE=auto
RUN mkdir /go
COPY --from=gobuilder /gobin /go/bin
COPY --from=gobuilder /usr/local/go /usr/local/go

ENV GOPATH /go
ENV PATH ${GOPATH}/bin:/usr/local/go/bin:${PATH}
# Add the default GOPATH/bin to the PATH.
# Add the directories of the go tool chains to PATH.
ENV PATH /workspace/vscodego/go/bin:/go/bin:/usr/local/go/bin:${PATH}
ENV DEBIAN_FRONTEND noninteractive

RUN apt-get update && apt-get install -y libnss3 libgtk-3-dev libxss1 libasound2 xvfb libsecret-1-0
Expand Down
28 changes: 14 additions & 14 deletions build/all.bash
Original file line number Diff line number Diff line change
Expand Up @@ -89,20 +89,20 @@ prepare_nightly() {

# setup dependencies required for tests.
install_dependencies() {
GO111MODULE=on go get -x golang.org/x/tools/gopls
GO111MODULE=on go get -x github.com/acroca/go-symbols
GO111MODULE=on go get -x github.com/cweill/gotests/...
GO111MODULE=on go get -x github.com/davidrjenni/reftools/cmd/fillstruct
GO111MODULE=on go get -x github.com/haya14busa/goplay/cmd/goplay
GO111MODULE=on go get -x github.com/mdempsky/gocode
GO111MODULE=on go get -x github.com/ramya-rao-a/go-outline
GO111MODULE=on go get -x github.com/rogpeppe/godef
GO111MODULE=on go get -x github.com/sqs/goreturns
GO111MODULE=on go get -x github.com/uudashr/gopkgs/v2/cmd/gopkgs
GO111MODULE=on go get -x github.com/zmb3/gogetdoc
GO111MODULE=on go get -x golang.org/x/lint/golint
GO111MODULE=on go get -x golang.org/x/tools/cmd/gorename
GO111MODULE=on go get -x github.com/go-delve/delve/cmd/dlv
GO111MODULE=on go get golang.org/x/tools/gopls
GO111MODULE=on go get github.com/acroca/go-symbols
GO111MODULE=on go get github.com/cweill/gotests/...
GO111MODULE=on go get github.com/davidrjenni/reftools/cmd/fillstruct
GO111MODULE=on go get github.com/haya14busa/goplay/cmd/goplay
GO111MODULE=on go get github.com/mdempsky/gocode
GO111MODULE=on go get github.com/ramya-rao-a/go-outline
GO111MODULE=on go get github.com/rogpeppe/godef
GO111MODULE=on go get github.com/sqs/goreturns
GO111MODULE=on go get github.com/uudashr/gopkgs/v2/cmd/gopkgs
GO111MODULE=on go get github.com/zmb3/gogetdoc
GO111MODULE=on go get golang.org/x/lint/golint
GO111MODULE=on go get golang.org/x/tools/cmd/gorename
GO111MODULE=on go get github.com/go-delve/delve/cmd/dlv
}

main() {
Expand Down

0 comments on commit d533d37

Please sign in to comment.