Cloning source to GOPATH

Our Golang project is using dep to manage dependencies. This tool expects project source to be located in $GOPATH. Using the following snippet to resolve dependencies:

    image: golang:1.9
      - go get -u
      - dep ensure
      event: [push, tag, pull_request]

Getting an error like the following:

/drone/src/ is not within a known GOPATH. Should I add customized clone stage to my .drone.yml in order to overcome this problem? If so, do you have any examples of how to do this?

P.S. I also investigated Drone build configuration and can state that it works because this configuration is using go get only, i.e. copies all dependencies to global sources storage.

do you have a workspace section?

  base: /go
  path: src/


1 Like

Thank you. How could I miss this documentation chapter? Feeling like a noob. :slight_smile: