2015-06-29 12:14:41 -04:00
|
|
|
# appveyor.yml reference : http://www.appveyor.com/docs/appveyor-yml
|
|
|
|
|
|
|
|
version: "{build}"
|
|
|
|
|
|
|
|
skip_tags: true
|
|
|
|
|
2015-06-29 14:04:07 -04:00
|
|
|
branches:
|
|
|
|
only:
|
|
|
|
- master
|
|
|
|
|
2015-06-29 12:14:41 -04:00
|
|
|
os: Windows Server 2012 R2
|
|
|
|
|
|
|
|
environment:
|
|
|
|
GOPATH: c:\gopath
|
|
|
|
|
2017-06-05 14:17:47 -04:00
|
|
|
clone_folder: c:\gopath\src\github.com\hashicorp\packer
|
2015-06-29 12:14:41 -04:00
|
|
|
|
|
|
|
install:
|
2018-08-29 17:03:36 -04:00
|
|
|
- ps: |
|
|
|
|
# Installs golang on Windows.
|
|
|
|
#
|
|
|
|
# # Run script:
|
|
|
|
# .\install-go.ps1
|
|
|
|
#
|
|
|
|
# # Download and run script:
|
|
|
|
# $env:GOVERSION = '1.5.3'
|
|
|
|
# iex ((new-object net.webclient).DownloadString('SCRIPT_URL_HERE'))
|
|
|
|
|
|
|
|
$version = '1.11'
|
|
|
|
|
|
|
|
$downloadDir = $env:TEMP
|
|
|
|
$packageName = 'golang'
|
|
|
|
$url32 = 'https://storage.googleapis.com/golang/go' + $version + '.windows-386.zip'
|
|
|
|
$url64 = 'https://storage.googleapis.com/golang/go' + $version + '.windows-amd64.zip'
|
|
|
|
$goroot = "C:\go$version"
|
|
|
|
|
|
|
|
# Determine type of system
|
|
|
|
if ($ENV:PROCESSOR_ARCHITECTURE -eq "AMD64") {
|
|
|
|
$url = $url64
|
|
|
|
} else {
|
|
|
|
$url = $url32
|
|
|
|
}
|
|
|
|
|
|
|
|
if (Test-Path "$goroot\bin\go") {
|
|
|
|
Write-Host "Go is installed to $goroot"
|
|
|
|
exit
|
|
|
|
}
|
|
|
|
|
|
|
|
echo "Downloading $url"
|
|
|
|
$zip = "$downloadDir\golang-$version.zip"
|
|
|
|
if (!(Test-Path "$zip")) {
|
|
|
|
$downloader = new-object System.Net.WebClient
|
|
|
|
$downloader.DownloadFile($url, $zip)
|
|
|
|
}
|
|
|
|
|
|
|
|
echo "Extracting $zip to $goroot"
|
|
|
|
if (Test-Path "$downloadDir\go") {
|
|
|
|
rm -Force -Recurse -Path "$downloadDir\go"
|
|
|
|
}
|
|
|
|
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
|
|
|
[System.IO.Compression.ZipFile]::ExtractToDirectory("$zip", $downloadDir)
|
|
|
|
mv "$downloadDir\go" $goroot
|
2016-02-05 17:08:58 -05:00
|
|
|
- set GO15VENDOREXPERIMENT=1
|
2018-08-29 17:03:36 -04:00
|
|
|
- set GOROOT=C:\go1.11
|
|
|
|
- set Path=%GOROOT%\bin;%PATH%
|
2015-06-29 12:14:41 -04:00
|
|
|
- echo %Path%
|
2018-08-29 17:03:36 -04:00
|
|
|
- echo %GOROOT%
|
2015-06-29 12:14:41 -04:00
|
|
|
- go version
|
|
|
|
- go env
|
2016-02-05 17:08:58 -05:00
|
|
|
- go get github.com/mitchellh/gox
|
|
|
|
- go get golang.org/x/tools/cmd/stringer
|
2015-06-29 12:14:41 -04:00
|
|
|
|
|
|
|
build_script:
|
2016-02-05 17:08:58 -05:00
|
|
|
- git rev-parse HEAD
|
2016-04-22 23:42:01 -04:00
|
|
|
# go test $(go list ./... | grep -v vendor)
|
|
|
|
- ps: |
|
|
|
|
go.exe test (go.exe list ./... `
|
|
|
|
|? { -not $_.Contains('/vendor/') } `
|
2017-04-04 16:39:01 -04:00
|
|
|
|? { $_ -ne 'github.com/hashicorp/packer/builder/parallels/common' } `
|
|
|
|
|? { $_ -ne 'github.com/hashicorp/packer/common' }`
|
|
|
|
|? { $_ -ne 'github.com/hashicorp/packer/provisioner/ansible' })
|
2015-06-29 12:14:41 -04:00
|
|
|
|
|
|
|
test: off
|
|
|
|
|
|
|
|
deploy: off
|