diff --git a/.drone.windows.yml b/.drone.windows.yml index 3d626de..dec9426 100644 --- a/.drone.windows.yml +++ b/.drone.windows.yml @@ -15,6 +15,9 @@ steps: - go vet ./... environment: GO111MODULE: on + volumes: + - name: gopath + path: C:\\gopath - name: test pull: always @@ -23,6 +26,13 @@ steps: - go test -cover ./... environment: GO111MODULE: on + volumes: + - name: gopath + path: C:\\gopath + +volumes: +- name: gopath + temp: {} --- kind: pipeline diff --git a/pipeline.libsonnet b/pipeline.libsonnet index 9cc61d4..00b01b7 100644 --- a/pipeline.libsonnet +++ b/pipeline.libsonnet @@ -11,7 +11,7 @@ local golang_image(os, version) = test(os='linux', arch='amd64', version=''):: local is_windows = windows(os); local golang = golang_image(os, version); - local volumes = if !is_windows then [{name: 'gopath', path: '/go',}] else []; + local volumes = if is_windows then [{name: 'gopath', path: 'C:\\\\gopath'}] else [{name: 'gopath', path: '/go',}]; { kind: 'pipeline', name: test_pipeline_name, @@ -31,7 +31,7 @@ local golang_image(os, version) = commands: [ 'go vet ./...', ], - volumes: if std.length(volumes) > 0 then volumes, + volumes: volumes, }, { name: 'test', @@ -43,10 +43,10 @@ local golang_image(os, version) = commands: [ 'go test -cover ./...', ], - volumes: if std.length(volumes) > 0 then volumes, + volumes: volumes, }, ], - volumes: if !is_windows then [{name: 'gopath', temp: {}}] + volumes: [{name: 'gopath', temp: {}}] }, build(name, os='linux', arch='amd64', version='')::