mirror of
https://github.com/drone-plugins/drone-webhook.git
synced 2026-06-04 18:24:05 +08:00
Add windows volumes during build
This commit is contained in:
@@ -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
|
||||
|
||||
+4
-4
@@ -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='')::
|
||||
|
||||
Reference in New Issue
Block a user