open-nomad/appveyor.yml
Mahmood Ali 94dfcaad70 Use golang 1.12.12
Use use base official golang image in CircleCI, as it gets refreshed
more quickly compared to circleci/golang, and we don't benefit from
circleci image customizations much.
2019-10-18 08:44:47 -04:00

68 lines
2.4 KiB
YAML

version: "build-{branch}-{build}"
image: Visual Studio 2017
clone_folder: c:\gopath\src\github.com\hashicorp\nomad
branches:
except:
- /^.-ui\b/
environment:
GOPATH: c:\gopath
GOBIN: c:\gopath\bin
GOMAXPROCS: 1
install:
# do basic docker smoke test, and pull image in preparation for tests
- cmd: docker info
- cmd: docker run --rm dantoml/busybox-windows:08012019 echo hi there
- cmd: |
cd C:\go
del /F/Q/S *.* > NUL
cd %APPVEYOR_BUILD_FOLDER%
rmdir /Q/S C:\go
# install go 1.12.12 to match version used for cutting a release
- cmd: |
mkdir c:\go
appveyor DownloadFile "https://dl.google.com/go/go1.12.12.windows-amd64.zip" -FileName "%TEMP%\\go.zip"
- ps: Expand-Archive $Env:TEMP\go.zip -DestinationPath C:\
- cmd: set PATH=%GOBIN%;c:\go\bin;%PATH%
- cmd: echo %Path%
- cmd: go version
- cmd: go env
- ps: mkdir C:\gopath\bin
- ps: appveyor DownloadFile "https://releases.hashicorp.com/vault/0.10.2/vault_0.10.2_windows_amd64.zip" -FileName "C:\\gopath\\bin\\vault.zip"
- ps: Expand-Archive C:\gopath\bin\vault.zip -DestinationPath C:\gopath\bin
# - ps: appveyor DownloadFile "https://releases.hashicorp.com/consul/1.0.0/consul_1.0.0_windows_amd64.zip" -FileName "C:\\gopath\\bin\\consul.zip"
# - ps: Expand-Archive C:\gopath\bin\consul.zip -DestinationPath C:\gopath\bin
- ps: choco install make
- ps: |
go get -u github.com/kardianos/govendor
go get -u github.com/ugorji/go/codec/codecgen
go get -u github.com/hashicorp/go-bindata/go-bindata
go get -u github.com/elazarl/go-bindata-assetfs/go-bindata-assetfs
go get -u github.com/a8m/tree/cmd/tree
go get -u github.com/magiconair/vendorfmt/cmd/vendorfmt
go get -u github.com/golang/protobuf/protoc-gen-go
go get -u gotest.tools/gotestsum
build_script:
- cmd: |
set PATH=%GOPATH%/bin;%PATH%
go build -o %GOPATH%\bin\nomad.exe
test_script:
# only test docker driver tests for now
- cmd:
gotestsum --junitfile results.xml
github.com/hashicorp/nomad/drivers/docker
github.com/hashicorp/nomad/client/lib/fifo
github.com/hashicorp/nomad/client/logmon
# on_finish:
# - ps: |
# Push-AppveyorArtifact (Resolve-Path .\results.xml)
# $wc = New-Object 'System.Net.WebClient'
# $wc.UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\results.xml))