0
0
mirror of https://github.com/thegeeklab/wp-matrix.git synced 2024-11-22 00:30:41 +00:00

Updated to current build process

This commit is contained in:
Thomas Boerger 2018-03-16 13:07:56 +01:00
parent be7e7a0729
commit e6f4d33f40
No known key found for this signature in database
GPG Key ID: 5A388F55283960B6
5 changed files with 34 additions and 43 deletions

View File

@ -1,11 +1,12 @@
version: '{build}' version: '{build}'
image: 'Visual Studio 2017' image: 'Visual Studio 2017'
platform: x64 platform: 'x64'
clone_folder: 'c:\go\src\github.com\drone-plugins\drone-matrix' clone_folder: 'c:\gopath\src\github.com\drone-plugins\drone-matrix'
max_jobs: 1 max_jobs: 1
environment: environment:
GOPATH: c:\gopath
DOCKER_USERNAME: DOCKER_USERNAME:
secure: '4YzzahbEiMZQJpOCOd1LAw==' secure: '4YzzahbEiMZQJpOCOd1LAw=='
DOCKER_PASSWORD: DOCKER_PASSWORD:
@ -15,14 +16,19 @@ install:
- ps: | - ps: |
docker version docker version
go version go version
- ps: |
$env:Path = "c:\gopath\bin;$env:Path"
build_script: build_script:
- ps: | - ps: |
go get -u github.com/golang/dep/cmd/dep
dep ensure
if ( $env:APPVEYOR_REPO_TAG -eq 'false' ) { if ( $env:APPVEYOR_REPO_TAG -eq 'false' ) {
go build -ldflags "-X main.build=$env:APPVEYOR_BUILD_VERSION" -a -o drone-matrix.exe go build -ldflags "-X main.build=$env:APPVEYOR_BUILD_VERSION" -a -o release/drone-matrix.exe
} else { } else {
$version = $env:APPVEYOR_REPO_TAG_NAME.substring(1) $version = $env:APPVEYOR_REPO_TAG_NAME.substring(1)
go build -ldflags "-X main.version=$version -X main.build=$env:APPVEYOR_BUILD_VERSION" -a -o drone-matrix.exe go build -ldflags "-X main.version=$version -X main.build=$env:APPVEYOR_BUILD_VERSION" -a -o release/drone-matrix.exe
} }
docker pull microsoft/nanoserver:10.0.14393.1593 docker pull microsoft/nanoserver:10.0.14393.1593

View File

@ -3,18 +3,22 @@ workspace:
path: src/github.com/drone-plugins/drone-matrix path: src/github.com/drone-plugins/drone-matrix
pipeline: pipeline:
test: deps:
image: golang:1.9 image: golang:1.10
pull: true pull: true
commands: commands:
- go vet - go get -u github.com/golang/dep/cmd/dep
- | - dep ensure
for PKG in $(go list ./... | grep -v /vendor/); do
go test -cover -coverprofile $GOPATH/src/$PKG/coverage.out $PKG test:
done image: golang:1.10
pull: true
commands:
- go vet ./...
- go test -cover ./...
build_linux_amd64: build_linux_amd64:
image: golang:1.9 image: golang:1.10
pull: true pull: true
group: build group: build
environment: environment:
@ -30,7 +34,7 @@ pipeline:
fi fi
build_linux_i386: build_linux_i386:
image: golang:1.9 image: golang:1.10
pull: true pull: true
group: build group: build
environment: environment:
@ -46,7 +50,7 @@ pipeline:
fi fi
build_linux_arm64: build_linux_arm64:
image: golang:1.9 image: golang:1.10
pull: true pull: true
group: build group: build
environment: environment:
@ -62,7 +66,7 @@ pipeline:
fi fi
build_linux_arm: build_linux_arm:
image: golang:1.9 image: golang:1.10
pull: true pull: true
group: build group: build
environment: environment:
@ -79,7 +83,7 @@ pipeline:
fi fi
publish_linux_amd64: publish_linux_amd64:
image: plugins/docker:17.05 image: plugins/docker:17.12
pull: true pull: true
secrets: [ docker_username, docker_password ] secrets: [ docker_username, docker_password ]
group: docker group: docker
@ -91,7 +95,7 @@ pipeline:
event: [ push, tag ] event: [ push, tag ]
publish_linux_i386: publish_linux_i386:
image: plugins/docker:17.05 image: plugins/docker:17.12
pull: true pull: true
secrets: [ docker_username, docker_password ] secrets: [ docker_username, docker_password ]
group: docker group: docker
@ -103,7 +107,7 @@ pipeline:
event: [ push, tag ] event: [ push, tag ]
publish_linux_arm64: publish_linux_arm64:
image: plugins/docker:17.05 image: plugins/docker:17.12
pull: true pull: true
secrets: [ docker_username, docker_password ] secrets: [ docker_username, docker_password ]
group: docker group: docker
@ -115,7 +119,7 @@ pipeline:
event: [ push, tag ] event: [ push, tag ]
publish_linux_arm: publish_linux_arm:
image: plugins/docker:17.05 image: plugins/docker:17.12
pull: true pull: true
secrets: [ docker_username, docker_password ] secrets: [ docker_username, docker_password ]
group: docker group: docker

2
.gitignore vendored
View File

@ -24,5 +24,7 @@ _testmain.go
*.prof *.prof
release/ release/
vendor/
coverage.out coverage.out
drone-matrix drone-matrix

View File

@ -6,5 +6,7 @@ LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" `
org.label-schema.vendor="Drone.IO Community" ` org.label-schema.vendor="Drone.IO Community" `
org.label-schema.schema-version="1.0" org.label-schema.schema-version="1.0"
ADD drone-matrix.exe c:\drone-matrix.exe SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
ADD release\drone-matrix.exe c:\drone-matrix.exe
ENTRYPOINT [ "c:\\drone-matrix.exe" ] ENTRYPOINT [ "c:\\drone-matrix.exe" ]

View File

@ -1,26 +1,3 @@
# Gopkg.toml example
#
# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md
# for detailed Gopkg.toml documentation.
#
# required = ["github.com/user/thing/cmd/thing"]
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
#
# [[constraint]]
# name = "github.com/user/project"
# version = "1.0.0"
#
# [[constraint]]
# name = "github.com/user/project2"
# branch = "dev"
# source = "github.com/myfork/project2"
#
# [[override]]
# name = "github.com/x/y"
# version = "2.4.0"
[[constraint]] [[constraint]]
name = "github.com/aymerick/raymond" name = "github.com/aymerick/raymond"
version = "2.0.1" version = "2.0.1"