Build, integration tests and publishing on Windows

This commit is contained in:
Matt Ellis 2017-09-22 17:51:59 -07:00
parent cb54cfcf0f
commit cb6ac2785e
11 changed files with 291 additions and 3 deletions

39
.appveyor.yml Normal file
View file

@ -0,0 +1,39 @@
version: 1.0.{build}
image: Visual Studio 2015
configuration: Release
platform: x64
clone_folder: '%USERPROFILE%\go\src\github.com\pulumi\pulumi'
init:
- ps: Install-Product node 6.10.2 x64
environment:
AWS_ACCESS_KEY_ID:
secure: eB7Gfl1GHhz60tH2EEASI7IFsWHDd5SV+kponXwaCSo=
AWS_SECRET_ACCESS_KEY:
secure: T19RJk7Uv3trAChRRDB82OAUDI8k2q9PaSetU7yDFu4aC+MshdwAhTTN/TaPkwl/
PULUMI_BOT_KEY:
secure: 2eNAsVVnoBSs0bIz9NXNF/we2hO9xEdYnFMuXRP2TaY+hR+GzjrOhrCSST3OTLhzsBt9wQdLkxeqHbIBmF+KaNOdUjY6Nuv5kUetTSroytMzIxDCy5WFJkc+N7QSzASwOrf9xg6jkck+gmQV7MAgDL7XElc7yVg+CsM5CvU7sHuV0uwW2wDaAjnF1BpNMLtzZxOVIHe/mxRiDeLMB8tGGD5gjRc8vB2mPz8JzWs6rJTAFOOqNfI7NT7AvDI1HD5bmYaI7KYgCT44tVB4y11grVmA8f5vPtgSq65/6efyswXNUTueS3YB9Y8IsI/HJ/shPqDdY0eqDuwAVpXUE+bxmz3ayxbk9QFkIdIwaqPyp+fhcUFhsiF6oGiw7IgrqH1gd9q61Z7ZvDONmOsrDFsy23JHbY3L9IEeXxWj3PhxDXzcbpD7CgU/6cXD9TUShlh1ZOJ664/hNUsb38P86zEm5KNs9cG2V4dyKp6wu0L4KxuhD3iHDxUs7nbnCjTy7lAQ7sd9D/MenmhtqgJLYCEGS6qL0hnA4Xx8Xk/jgeeN61CKpYKfc43KJnTMD/NJnYt0F09du9z0f0N1D7DURFgHe6BvvggUFiPZY7S8sqoEPISm2sbIQSd6SDMteblb2HRBpsXmLwtMc/YGv8l14Tn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gmgoHwhOjV9IAowrjJhALwA1CUvr6B+s2YN36+CS95TDJCKydSRcPvXY54coI1DjlH337xnEu/lrWIITSvwfLCx3ah2g2k01c/mslsxDxuEtRR1o0TifKyaAi2LTGsU6SpO2pEr2wDbBFGvHDlGkYA6xhIqy6l6/ONhWOH2X/EFRKgbdX9c2MBMRrkg4rSLvTfHY3eVZLXfE3GSImGgauGyjHO9NNh85aCVNUlIVxTL4A7lzDOBzhdkYr9LmZwZYKaDbbgeEyCOLXhcUp4wpOPinSxrRYjuXAyffSbXkCJZy2kYQ4lqKILCvW9ZGO+r6cN8WC5Jzaodtm5Hpx2DoYO05DQ==
install:
- ps: >-
$fileContent = "-----BEGIN RSA PRIVATE KEY-----`n"
$fileContent += $env:PULUMI_BOT_KEY.Replace(' ', "`n")
$fileContent += "`n-----END RSA PRIVATE KEY-----`n"
Set-Content $env:USERPROFILE\.ssh\id_rsa $fileContent
- cmd: >-
set GOPATH=%USERPROFILE%\go
set PATH=%PATH%;%GOPATH%\bin
set PATH=%USERPROFILE%\go\src\github.com\pulumi\pulumi\sdk\nodejs\bin;%PATH%
go version
go get -u github.com/golang/dep/cmd/dep
git clone git@github.com:pulumi/home.git "%USERPROFILE%\go\src\github.com\pulumi\home"
build_script:
- cmd: >-
if defined APPVEYOR_PULL_REQUEST_NUMBER ( msbuild /t:AppVeyorPullRequest /v:Detailed build.proj ) else ( msbuild /t:AppVeyorPush /v:Detailed build.proj )
test: off

149
build.proj Normal file
View file

@ -0,0 +1,149 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<RepoRootDirectory>$(MSBuildThisFileDirectory)</RepoRootDirectory>
<SdkDirectory>$(RepoRootDirectory)\sdk\</SdkDirectory>
<NodeJSSdkDirectory>$(SdkDirectory)\nodejs\</NodeJSSdkDirectory>
<NativeRuntimeModuleDirectory>$(NodeJSSdkDirectory)\runtime\native\</NativeRuntimeModuleDirectory>
<NodeVersion>6.10.2</NodeVersion>
<NodeArch>x64</NodeArch>
<TestParallelism>10</TestParallelism>
</PropertyGroup>
<Target Name="EnsureGoDependencies">
<Exec Command="dep ensure -v"
WorkingDirectory="$(RepoRootDirectory)" />
</Target>
<Target Name="EnsureNodeDependencies">
<Exec Command="yarn install"
WorkingDirectory="$(NodeJSSdkDirectory)" />
</Target>
<Target Name="EnsureCustomNode"
Condition="!Exists('$(NodeJSSdkDirectory)\custom_node\node.exe')">
<MakeDir Directories="$(NodeJSSdkDirectory)\custom_node" />
<Exec Command="aws s3 cp --only-show-errors s3://eng.pulumi.com/node/node-$(NodeVersion)-win-$(NodeArch).zip &quot;$(NodeJSSdkDirectory)\custom_node\node-$(NodeVersion)-win-$(NodeArch).zip&quot;"/>
<Exec Command="7z x -o&quot;$(NodeJSSdkDirectory)\custom_node&quot; &quot;$(NodeJSSdkDirectory)\custom_node\node-$(NodeVersion)-win-$(NodeArch).zip&quot;" />
</Target>
<Target Name="CopyNodeSdkProtos">
<ItemGroup>
<NodeSdkProtos Include="$(SdkDirectory)\proto\nodejs\**\*" />
</ItemGroup>
<Copy SourceFiles="@(NodeSdkProtos)"
DestinationFolder="$(NodeJSSdkDirectory)\proto" />
</Target>
<Target Name="ConfigureNativeRuntimeModule"
DependsOnTargets="EnsureNodeDependencies">
<Exec Command="&quot;$(NativeRuntimeModuleDirectory)\ensure_node_v8.cmd&quot;"
WorkingDirectory="$(NativeRuntimeModuleDirectory)" />
<Exec Command="&quot;$(NodeJSSdkDirectory)\node_modules\.bin\node-gyp.cmd&quot; configure --msvs_version 2015 --devdir &quot;$(NativeRuntimeModuleDirectory)\node_dev&quot;"
WorkingDirectory="$(NativeRuntimeModuleDirectory)" />
<Copy SourceFiles="$(NodeJSSdkDirectory)\custom_node\node.lib"
DestinationFiles="$(NativeRuntimeModuleDirectory)\node_dev\$(NodeVersion)\$(NodeArch)\node.lib" />
</Target>
<Target Name="BuildNativeRuntimeModule"
DependsOnTargets="ConfigureNativeRuntimeModule">
<Exec Command="&quot;$(NodeJSSdkDirectory)\node_modules\.bin\node-gyp.cmd&quot; build --msvs_version 2015 --devdir &quot;$(NativeRuntimeModuleDirectory)\node_dev&quot;"
WorkingDirectory="$(NativeRuntimeModuleDirectory)" />
</Target>
<Target Name="TypeScriptCompileNodeSdk">
<Exec Command="yarn run tsc"
WorkingDirectory="$(NodeJSSdkDirectory)" />
</Target>
<Target Name="BinplaceNodeSdkProtos">
<ItemGroup>
<NodeSdkProtosForBinplace Include="$(NodeSdkDirectory)\proto\nodejs\**\*" />
</ItemGroup>
<Copy SourceFiles="@(NodeSdkProtos)"
DestinationFolder="$(NodeJSSdkDirectory)\bin\proto" />
</Target>
<Target Name="BinPlaceNodeSdkNativeRuntimeModule"
DependsOnTargets="BuildNativeRuntimeModule">
<ItemGroup>
<NodeSdkNativeRuntimeModuleFiles Include="$(NativeRuntimeModuleDirectory)\build\Release\nativeruntime.node" />
<NodeSdkNativeRuntimeModuleFiles Include="$(NativeRuntimeModuleDirectory)\build\Release\nativeruntime.pdb" />
</ItemGroup>
<Copy SourceFiles="@(NodeSdkNativeRuntimeModuleFiles)"
DestinationFolder="$(NodeJSSdkDirectory)\bin\runtime\native\build\Release" />
</Target>
<Target Name="BinPlaceNodeSdkTestData">
<ItemGroup>
<NodeSdkTestDataFiles Include="$(NodeJSSdkDirectory)\tests\runtime\langhost\cases\**\*" />
</ItemGroup>
<Copy SourceFiles="@(NodeSdkTestDataFiles)"
DestinationFolder="$(NodeJSSdkDirectory)\bin\tests\runtime\langhost\cases" />
</Target>
<Target Name="YarnLinkSdk">
<Copy SourceFiles="$(NodeJSSdkDirectory)\package.json"
DestinationFiles="$(NodeJSSdkDirectory)\bin\package.json" />
<Exec Command="yarn link"
WorkingDirectory="$(NodeJSSdkDirectory)\bin" />
</Target>
<Target Name="BinPlaceNodeSdk"
DependsOnTargets="BinPlaceNodeSdkProtos;BinPlaceNodeSdkNativeRuntimeModule;BinPlaceNodeSdkTestData;YarnLinkSdk">
</Target>
<Target Name="BuildNodeSdk"
DependsOnTargets="CopyNodeSdkProtos;BuildNativeRuntimeModule;TypeScriptCompileNodeSdk;BinPlaceNodeSdk">
</Target>
<Target Name="BuildGoCmds">
<ItemGroup>
<GoCmdsToBuild Include="github.com/pulumi/pulumi" />
<GoCmdsToBuild Include="github.com/pulumi/pulumi/cmd/lumidl" />
</ItemGroup>
<Exec Command="go install %(GoCmdsToBuild.Identity)" />
<ItemGroup>
<GoCmdsToBuild />
</ItemGroup>
</Target>
<Target Name="Build"
DependsOnTargets="EnsureGoDependencies;EnsureNodeDependencies;EnsureCustomNode;BuildNodeSdk;BuildGoCmds">
</Target>
<Target Name="IntegrationTest">
<Exec Command="where pulumi-langhost-nodejs.cmd"
IgnoreExitCode="true">
<Output TaskParameter="ExitCode" PropertyName="WhereLangHostExitCode" />
</Exec>
<Error Message="Please add &quot;$(NodeJSSdkDirectory)\bin&quot; to your path before running integration tests."
Condition="$(WhereLangHostExitCode) != 0"/>
<Exec Command="go test -cover -parallel $(TestParallelism) .\examples"
WorkingDirectory="$(RepoRootDirectory)" />
<!-- Work around pulumi/pulumi#371 by killing all lingering node.exe processes. Yes, in the limit
this may kill too much, but we assume for now folks hacking on pulumi on windows are not running
additional node.exe processes -->
<Exec Command="taskkill /f /im node.exe" />
</Target>
<Target Name="Publish">
<Exec Command="&quot;$(RepoRootDirectory)\scripts\publish.cmd" />
</Target>
<Target Name="AppVeyorPush"
DependsOnTargets="Build;IntegrationTest;Publish" />
<Target Name="AppVeyorPullRequest"
DependsOnTargets="Build;IntegrationTest" />
</Project>

View file

@ -1 +1 @@
@%~dp0\node.exe -e "require(\"pulumi/cmd/langhost\")" %*
@"%~dp0\node\node.exe" -e "require(\"pulumi/cmd/langhost\")" %*

46
scripts/make_release.ps1 Normal file
View file

@ -0,0 +1,46 @@
# make_release.ps1 will create a build package ready for publishing.
Set-StrictMode -Version 2.0
$ErrorActionPreference="Stop"
$Root=Join-Path $PSScriptRoot ".."
$PublishDir=New-Item -ItemType Directory -Path "$env:TEMP\$([System.IO.Path]::GetRandomFileName())"
$GitVersion=$(git rev-parse HEAD)
$PublishFile="$(Split-Path -Parent -Path $PublishDir)\$GitVersion.zip"
$Branch = $(if (Test-Path env:APPVEYOR_REPO_BRANCH) { $env:APPVEYOR_REPO_BRANCH } else { $(git rev-parse --abbrev-ref HEAD) })
$PublishTargets = @($GitVersion, $Branch)
# If there's a tag, publish using that description as well
try { $PublishTargets += $(git describe --tags 2>$null) } catch { }
function RunGoBuild($goPackage) {
$binRoot = New-Item -ItemType Directory -Force -Path "$PublishDir\bin"
$outputName = Split-Path -Leaf $(go list -f "{{.Target}}" $goPackage)
go build -o $binRoot\${outputName}.exe $goPackage
}
function CopyPackage($pathToModule, $moduleName) {
$moduleRoot = New-Item -ItemType Directory -Force -Path "$PublishDir\node_modules\$moduleName"
Copy-Item -Recurse $pathToModule\* $moduleRoot
if (Test-Path (Join-Path $moduleRoot "node_modules")) {
Remove-Item -Recurse -Force "$moduleRoot\node_modules"
}
}
RunGoBuild "github.com/pulumi/pulumi"
CopyPackage "$Root\sdk\nodejs\bin" "pulumi"
Copy-Item "$Root\dist\sdk\nodejs\pulumi-langhost-nodejs.cmd" "$PublishDir\bin"
New-Item -ItemType Directory -Force -Path "$PublishDir\bin\node" | Out-Null
Copy-Item "$Root\sdk\nodejs\custom_node\node.exe" "$PublishDir\bin\node"
# By default, if the archive already exists, 7zip will just add files to it, so blow away the existing
# archive if it exists.
if (Test-Path $PublishFile) {
Remove-Item -Force $PublishFile
}
7z a "$PublishFile" "$PublishDir\." | Out-Null
Remove-Item -Recurse -Force $PublishDir
New-Object PSObject -Property @{ArchivePath=$PublishFile;Targets=$PublishTargets}

2
scripts/publish.cmd Normal file
View file

@ -0,0 +1,2 @@
@echo off
powershell -noprofile -executionPolicy Unrestricted -file "%~dpn0.ps1" %*

16
scripts/publish.ps1 Normal file
View file

@ -0,0 +1,16 @@
# publish.ps1 builds and publishes a release.
Set-StrictMode -Version 2.0
$ErrorActionPreference="Stop"
$PublishScript="$(go env GOPATH)\src\github.com\pulumi\home\scripts\publish.ps1"
if (!(Test-Path $PublishScript)) {
Write-Error "Missing publish script at $PublishScript"
}
$ReleaseInfo=& $PSScriptRoot\make_release.ps1
$PublishTargets=${ReleaseInfo}.Targets
& $PublishScript $ReleaseInfo.ArchivePath "pulumi/windows/x64" @PublishTargets
Remove-Item -Force $ReleaseInfo.ArchivePath

View file

@ -3,7 +3,7 @@
set -o nounset -o errexit -o pipefail
PUBLISH=$GOPATH/src/github.com/pulumi/home/scripts/publish.sh
PUBLISH_GOOS=("linux" "windows" "darwin")
PUBLISH_GOOS=("linux" "darwin")
PUBLISH_GOARCH=("amd64")
PUBLISH_PROJECT="pulumi"

View file

@ -1,6 +1,8 @@
/bin/*
!/bin/pulumi-langhost-nodejs
!/bin/pulumi-langhost-nodejs.cmd
/coverage/
/node_modules/
/proto/
/custom_node/
/runtime/native/node_dev/

View file

@ -0,0 +1,7 @@
@echo off
cd "%~dp0"
REM We depend on a custom node build that has exposed some internal state
REM This node is downloaded and extracted via the EnsureCustomNode target
REM in the root build.proj
"%~dp0\..\custom_node\node.exe" -e "require('./cmd/langhost');" %*

View file

@ -0,0 +1,2 @@
@echo off
powershell -noprofile -executionPolicy Unrestricted -file "%~dpn0.ps1" %*

View file

@ -0,0 +1,25 @@
Set-StrictMode -Version 2.0
$ErrorActionPreference = "Stop"
$NodeBase="$PSScriptRoot\third_party\node"
$NodeTarget="$NodeBase\node-$(node -p "process.version")"
if (Test-Path "$NodeTarget") {
Write-Output "Node.js/V8 internal sources and headers download, as they already exist"
} else {
$NodeDistro=node -p "process.release.sourceUrl"
Write-Output "Downloading Node.js/V8 internal sources and headers from $NodeDistro..."
$NodeTarball=[System.IO.Path]::GetTempFileName()
Invoke-WebRequest -Uri "$NodeDistro" -OutFile "$NodeTarball"
# Unfortunately, 7-zip can't extract a tgz in a single gesture
$NodeTarPath=Join-Path ([System.IO.Path]::GetTempPath()) ([System.IO.Path]::GetRandomFileName())
New-Item -ItemType Directory -Path "$NodeTarPath"
7z x -o"$NodeTarPath" "$NodeTarball"
New-Item -ItemType Directory -Path "$NodeBase"
7z x -o"$NodeBase" (Join-Path "$NodeTarPath" "node-$(node -p "process.version").tar")
Remove-Item -Force -Recurse "$NodeTarPath"
Remove-Item -Force "$NodeTarball"
}
Write-Output "Done; $NodeTarget is fully populated."