Skip to content

Commit e6f4d33

Browse files
committed
Updated to current build process
1 parent be7e7a0 commit e6f4d33

File tree

5 files changed

+33
-42
lines changed

5 files changed

+33
-42
lines changed

.appveyor.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
version: '{build}'
22
image: 'Visual Studio 2017'
3-
platform: x64
3+
platform: 'x64'
44

5-
clone_folder: 'c:\go\src\github.com\drone-plugins\drone-matrix'
5+
clone_folder: 'c:\gopath\src\github.com\drone-plugins\drone-matrix'
66
max_jobs: 1
77

88
environment:
9+
GOPATH: c:\gopath
910
DOCKER_USERNAME:
1011
secure: '4YzzahbEiMZQJpOCOd1LAw=='
1112
DOCKER_PASSWORD:
@@ -15,14 +16,19 @@ install:
1516
- ps: |
1617
docker version
1718
go version
19+
- ps: |
20+
$env:Path = "c:\gopath\bin;$env:Path"
1821
1922
build_script:
2023
- ps: |
24+
go get -u github.com/golang/dep/cmd/dep
25+
dep ensure
26+
2127
if ( $env:APPVEYOR_REPO_TAG -eq 'false' ) {
22-
go build -ldflags "-X main.build=$env:APPVEYOR_BUILD_VERSION" -a -o drone-matrix.exe
28+
go build -ldflags "-X main.build=$env:APPVEYOR_BUILD_VERSION" -a -o release/drone-matrix.exe
2329
} else {
2430
$version = $env:APPVEYOR_REPO_TAG_NAME.substring(1)
25-
go build -ldflags "-X main.version=$version -X main.build=$env:APPVEYOR_BUILD_VERSION" -a -o drone-matrix.exe
31+
go build -ldflags "-X main.version=$version -X main.build=$env:APPVEYOR_BUILD_VERSION" -a -o release/drone-matrix.exe
2632
}
2733
2834
docker pull microsoft/nanoserver:10.0.14393.1593

.drone.yml

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,22 @@ workspace:
33
path: src/github.com/drone-plugins/drone-matrix
44

55
pipeline:
6+
deps:
7+
image: golang:1.10
8+
pull: true
9+
commands:
10+
- go get -u github.com/golang/dep/cmd/dep
11+
- dep ensure
12+
613
test:
7-
image: golang:1.9
14+
image: golang:1.10
815
pull: true
916
commands:
10-
- go vet
11-
- |
12-
for PKG in $(go list ./... | grep -v /vendor/); do
13-
go test -cover -coverprofile $GOPATH/src/$PKG/coverage.out $PKG
14-
done
17+
- go vet ./...
18+
- go test -cover ./...
1519

1620
build_linux_amd64:
17-
image: golang:1.9
21+
image: golang:1.10
1822
pull: true
1923
group: build
2024
environment:
@@ -30,7 +34,7 @@ pipeline:
3034
fi
3135
3236
build_linux_i386:
33-
image: golang:1.9
37+
image: golang:1.10
3438
pull: true
3539
group: build
3640
environment:
@@ -46,7 +50,7 @@ pipeline:
4650
fi
4751
4852
build_linux_arm64:
49-
image: golang:1.9
53+
image: golang:1.10
5054
pull: true
5155
group: build
5256
environment:
@@ -62,7 +66,7 @@ pipeline:
6266
fi
6367
6468
build_linux_arm:
65-
image: golang:1.9
69+
image: golang:1.10
6670
pull: true
6771
group: build
6872
environment:
@@ -79,7 +83,7 @@ pipeline:
7983
fi
8084
8185
publish_linux_amd64:
82-
image: plugins/docker:17.05
86+
image: plugins/docker:17.12
8387
pull: true
8488
secrets: [ docker_username, docker_password ]
8589
group: docker
@@ -91,7 +95,7 @@ pipeline:
9195
event: [ push, tag ]
9296

9397
publish_linux_i386:
94-
image: plugins/docker:17.05
98+
image: plugins/docker:17.12
9599
pull: true
96100
secrets: [ docker_username, docker_password ]
97101
group: docker
@@ -103,7 +107,7 @@ pipeline:
103107
event: [ push, tag ]
104108

105109
publish_linux_arm64:
106-
image: plugins/docker:17.05
110+
image: plugins/docker:17.12
107111
pull: true
108112
secrets: [ docker_username, docker_password ]
109113
group: docker
@@ -115,7 +119,7 @@ pipeline:
115119
event: [ push, tag ]
116120

117121
publish_linux_arm:
118-
image: plugins/docker:17.05
122+
image: plugins/docker:17.12
119123
pull: true
120124
secrets: [ docker_username, docker_password ]
121125
group: docker

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,7 @@ _testmain.go
2424
*.prof
2525

2626
release/
27+
vendor/
28+
2729
coverage.out
2830
drone-matrix

Dockerfile.windows

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,7 @@ LABEL maintainer="Drone.IO Community <[email protected]>" `
66
org.label-schema.vendor="Drone.IO Community" `
77
org.label-schema.schema-version="1.0"
88

9-
ADD drone-matrix.exe c:\drone-matrix.exe
9+
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
10+
11+
ADD release\drone-matrix.exe c:\drone-matrix.exe
1012
ENTRYPOINT [ "c:\\drone-matrix.exe" ]

Gopkg.toml

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,3 @@
1-
2-
# Gopkg.toml example
3-
#
4-
# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md
5-
# for detailed Gopkg.toml documentation.
6-
#
7-
# required = ["github.com/user/thing/cmd/thing"]
8-
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
9-
#
10-
# [[constraint]]
11-
# name = "github.com/user/project"
12-
# version = "1.0.0"
13-
#
14-
# [[constraint]]
15-
# name = "github.com/user/project2"
16-
# branch = "dev"
17-
# source = "github.com/myfork/project2"
18-
#
19-
# [[override]]
20-
# name = "github.com/x/y"
21-
# version = "2.4.0"
22-
23-
241
[[constraint]]
252
name = "github.com/aymerick/raymond"
263
version = "2.0.1"

0 commit comments

Comments
 (0)