0

When running drone exec on my Windows 10 machine for a maven project, I'm immediately getting an error that doesn't quite have enough information to debug effectively:

> drone exec --local
Running Matrix job #0
500 Internal Server Error: Invalid volume spec "\\drone\\src": Invalid volume destination
path: '\drone\src' mount path must be absolute.

Even the Docker logs don't really give me anything to work with:

[10:46:01.794][ApiProxy       ][Info   ] proxy >> GET /v1.15/images/busybox:latest/json
[10:46:01.802][ApiProxy       ][Info   ] Dial Hyper-V socket 48de0224-c5be-4b4c-9524-ac9c4b61e0e2:23a432c2-537a-4291-bcb5-d62504644739
[10:46:01.808][ApiProxy       ][Info   ] Successfully dialed Hyper-V socket 48de0224-c5be-4b4c-9524-ac9c4b61e0e2:23a432c2-537a-4291-bcb5-d62504644739
[10:46:01.814][ApiProxy       ][Info   ] proxy << GET /v1.15/images/busybox:latest/json
[10:46:01.820][ApiProxy       ][Info   ] proxy >> POST /v1.15/containers/create?name=drone_ambassador_QK2xbay7OiI [rewriteBinds]
[10:46:01.832][ApiProxy       ][Info   ] proxy >> POST /v1.15/containers/create?name=drone_ambassador_QK2xbay7OiI
[10:46:01.839][ApiProxy       ][Info   ] Dial Hyper-V socket 48de0224-c5be-4b4c-9524-ac9c4b61e0e2:23a432c2-537a-4291-bcb5-d62504644739
[10:46:01.849][ApiProxy       ][Info   ] Successfully dialed Hyper-V socket 48de0224-c5be-4b4c-9524-ac9c4b61e0e2:23a432c2-537a-4291-bcb5-d62504644739
[10:46:01.855][ApiProxy       ][Info   ] proxy << POST /v1.15/containers/create?name=drone_ambassador_QK2xbay7OiI

I haven't done anything fancy with the drone configuration, and the only hint of what might be wrong with this is that Drone exec can't handle Windows paths, which seems unlikely considering the complete lack of relevant drone-cli issues.

pipeline:
  build:
    image: maven:3.3.9-jdk-8-alpine
    commands: [ "mvn clean package" ]

I'm looking for two things:

  1. An option reference for .drone.yml to the level of docker-compose.yml. The official documentation doesn't appear to have this anywhere, and seems to expect you to rely on the pseudo-tutorial examples.
  2. Some idea on how I can fix the error that's stopping me from making the best of the drone exec functionality and get on with actually using the tools, rather than wasting time fighting against them.

Addendum

Fiddling with the workspace.base attribute in the config lets me change what it's complaining about, and using a machine-specific absolute path (so useless) gives me a new error. Inputs and results:

workspace:
  base: /

Invalid volume spec "/": Invalid specification: destination can't be '/' in '/'

workspace:
  base: C:\code\project

C: drive is not shared. Please share it in Docker for Windows Settings NOTE: It is shared.

tzrlk
  • 848
  • 1
  • 13
  • 30
  • 1
    I do not believe `drone exec` is supported on windows at this time, but pull requests are certainly welcome. The trouble is most of the Drone dev team uses Linux or OSX, so having contributions from Windows users would be excellent. – Brad Rydzewski Jan 19 '17 at 14:06
  • Further investigation with other docker volume mounting makes it seem like a docker for windows problem, rather than drone itself. Will fiddle around and see if I can find either an existing issue or a solution. **Edit** Found something related: http://stackoverflow.com/q/38699317/41223 – tzrlk Jan 23 '17 at 21:17
  • 1
    I've had a similar problem, got it working, but thats more a ugly hack than a real fix, I might create a pull-request once I know how to fix this cleanly. A diff of my changes if you're interested: http://pastebin.com/aGPu4GPd – tkausl Jan 25 '17 at 22:26
  • @tkausl Have you submitted a pull-request yet? Might be worth it just to get it up there, even if it is a hack. Better working than not. You should also submit a response to this question with said pull request, since it appears to be the only "correct" answer. – tzrlk May 01 '17 at 00:53
  • 1
    @Tzrlk sorry for the late answer, I just submitted a PR: https://github.com/drone/drone-cli/pull/57 – tkausl Jul 17 '17 at 13:16

0 Answers0