diff --git a/tools/releaseBuild/Images/microsoft_powershell_windowsservercore/PowerShellPackage.ps1 b/tools/releaseBuild/Images/microsoft_powershell_windowsservercore/PowerShellPackage.ps1 index 2c5a7fd7133..b43ca5e7135 100644 --- a/tools/releaseBuild/Images/microsoft_powershell_windowsservercore/PowerShellPackage.ps1 +++ b/tools/releaseBuild/Images/microsoft_powershell_windowsservercore/PowerShellPackage.ps1 @@ -10,7 +10,8 @@ param ( [switch] $Wait, [ValidatePattern("^v\d+\.\d+\.\d+(-\w+\.\d+)?$")] [ValidateNotNullOrEmpty()] - [string]$ReleaseTag + [string]$ReleaseTag, + [switch] $Symbols ) $releaseTagParam = @{} @@ -55,7 +56,13 @@ try{ Start-PSBootstrap -Force -Package Write-Verbose "Starting powershell build for RID: $Runtime and ReleaseTag: $ReleaseTag ..." -verbose - Start-PSBuild -Clean -CrossGen -PSModuleRestore -Runtime $Runtime -Configuration Release @releaseTagParam + $buildParams = @{} + if(!$Symbols.IsPresent) + { + $buildParams['CrossGen'] = $true + } + + Start-PSBuild -Clean -PSModuleRestore -Runtime $Runtime -Configuration Release @releaseTagParam @buildParams $pspackageParams = @{'Type'='msi'} if ($Runtime -ne 'win10-x64') @@ -63,8 +70,15 @@ try{ $pspackageParams += @{'WindowsRuntime'=$Runtime} } - Write-Verbose "Starting powershell packaging(msi)..." -verbose - Start-PSPackage @pspackageParams @releaseTagParam + if(!$Symbols.IsPresent) + { + Write-Verbose "Starting powershell packaging(msi)..." -verbose + Start-PSPackage @pspackageParams @releaseTagParam + } + else + { + $pspackageParams += @{'IncludeSymbols' = $true} + } $pspackageParams['Type']='zip' Write-Verbose "Starting powershell packaging(zip)..." -verbose diff --git a/tools/releaseBuild/README.md b/tools/releaseBuild/README.md new file mode 100644 index 00000000000..838933702fe --- /dev/null +++ b/tools/releaseBuild/README.md @@ -0,0 +1,33 @@ +# VSTS Release Builds + +## Requirements + +Docker must be installed to run any of the release builds. + +## Running Windows Release Builds + +From PowerShell on Windows, run `.\vstsbuild.ps1 -ReleaseTag -Name `. + +Windows Build Names: + + * `win7-x64` + * Builds the Universal Windows x64 Package + * `win7-x86` + * Builds the Universal Windows x86 Package + * `win7-x64-symbols` + * Builds the Windows x64 Zip with symbols + * `win7-x86-symbols` + * Builds the Windows x86 Zip with symbols + +## Running Linux Release Builds + +From PowerShell on Linux or macOS, run `.\vstsbuild.ps1 -ReleaseTag -Name `. + +Linux Build Names: + + * `ubuntu.14.04` + * Builds the Ubuntu 14.04 Package and AppImage Package + * `ubuntu.16.04` + * Builds the Ubuntu 16.04 Package + * `centos.7` + * Builds the CentOS 7 Package diff --git a/tools/releaseBuild/build.json b/tools/releaseBuild/build.json index 1b309bc3dd8..f61bb05de77 100644 --- a/tools/releaseBuild/build.json +++ b/tools/releaseBuild/build.json @@ -10,7 +10,8 @@ ], "DockerFile": ".\\tools\\releaseBuild\\Images\\microsoft_powershell_windowsservercore\\DockerFile", "AdditionalContextFiles" :[ ".\\tools\\releaseBuild\\Images\\microsoft_powershell_windowsservercore\\PowerShellPackage.ps1"], - "DockerImageName": "ps-winsrvcore" + "DockerImageName": "ps-winsrvcore", + "BinaryBucket": "release" }, { "Name": "win7-x86", @@ -22,7 +23,34 @@ ], "DockerFile": ".\\tools\\releaseBuild\\Images\\microsoft_powershell_windowsservercore\\DockerFile", "AdditionalContextFiles" :[ ".\\tools\\releaseBuild\\Images\\microsoft_powershell_windowsservercore\\PowerShellPackage.ps1"], - "DockerImageName": "ps-winsrvcore" + "DockerImageName": "ps-winsrvcore", + "BinaryBucket": "release" + }, + { + "Name": "win7-x64-symbols", + "RepoDestinationPath": "C:\\PowerShell", + "BuildCommand": "C:\\PowerShellPackage.ps1 -location _RepoDestinationPath_ -destination _DockerVolume_ -Runtime win7-x64 -ReleaseTag _ReleaseTag_ -Symbols", + "BuildDockerOptions": [ + "-m", + "3968m" + ], + "DockerFile": ".\\tools\\releaseBuild\\Images\\microsoft_powershell_windowsservercore\\DockerFile", + "AdditionalContextFiles" :[ ".\\tools\\releaseBuild\\Images\\microsoft_powershell_windowsservercore\\PowerShellPackage.ps1"], + "DockerImageName": "ps-winsrvcore", + "BinaryBucket": "symbols" + }, + { + "Name": "win7-x86-symbols", + "RepoDestinationPath": "C:\\PowerShell", + "BuildCommand": "C:\\PowerShellPackage.ps1 -location _RepoDestinationPath_ -destination _DockerVolume_ -Runtime win7-x86 -ReleaseTag _ReleaseTag_ -Symbols", + "BuildDockerOptions": [ + "-m", + "3968m" + ], + "DockerFile": ".\\tools\\releaseBuild\\Images\\microsoft_powershell_windowsservercore\\DockerFile", + "AdditionalContextFiles" :[ ".\\tools\\releaseBuild\\Images\\microsoft_powershell_windowsservercore\\PowerShellPackage.ps1"], + "DockerImageName": "ps-winsrvcore", + "BinaryBucket": "symbols" } ], "Linux": [ @@ -41,7 +69,8 @@ ], "DockerFile": "./tools/releaseBuild/Images/microsoft_powershell_ubuntu14.04/Dockerfile", "AdditionalContextFiles" :[ "./tools/releaseBuild/Images/GenericLinuxFiles/PowerShellPackage.ps1"], - "DockerImageName": "ps-ubunutu-14-04" + "DockerImageName": "ps-ubunutu-14-04", + "BinaryBucket": "release" }, { "Name": "ubuntu.16.04", @@ -49,7 +78,8 @@ "BuildCommand": "/PowerShellPackage.ps1 -location _RepoDestinationPath_ -destination _DockerVolume_ -ReleaseTag _ReleaseTag_", "AdditionalContextFiles" :[ "./tools/releaseBuild/Images/GenericLinuxFiles/PowerShellPackage.ps1"], "DockerFile": "./tools/releaseBuild/Images/microsoft_powershell_ubuntu16.04/Dockerfile", - "DockerImageName": "ps-ubunutu-16-04" + "DockerImageName": "ps-ubunutu-16-04", + "BinaryBucket": "release" }, { "Name": "centos.7", @@ -57,7 +87,8 @@ "BuildCommand": "/PowerShellPackage.ps1 -location _RepoDestinationPath_ -destination _DockerVolume_ -ReleaseTag _ReleaseTag_ -ExtraPackage tar", "AdditionalContextFiles" :[ "./tools/releaseBuild/Images/GenericLinuxFiles/PowerShellPackage.ps1"], "DockerFile": "./tools/releaseBuild/Images/microsoft_powershell_centos7/Dockerfile", - "DockerImageName": "ps-centos-7" + "DockerImageName": "ps-centos-7", + "BinaryBucket": "release" } ] } diff --git a/tools/releaseBuild/vstsbuild.ps1 b/tools/releaseBuild/vstsbuild.ps1 index 9ef0d4e90ca..d2c296a0c14 100644 --- a/tools/releaseBuild/vstsbuild.ps1 +++ b/tools/releaseBuild/vstsbuild.ps1 @@ -3,12 +3,12 @@ param( [ValidatePattern("^v\d+\.\d+\.\d+(-\w+\.\d+)?$")] [string]$ReleaseTag, - [ValidateSet('win7-x86','win7-x64','ubuntu.14.04','ubuntu.16.04','centos.7')] + [ValidateSet('win7-x86','win7-x64','win7-x86-symbols','win7-x64-symbols','ubuntu.14.04','ubuntu.16.04','centos.7')] [String] $Name ) -$ErrorActionPreference = 'Stop' +$ErrorActionPreference = 'Stop' $psReleaseBranch = 'master' $psReleaseFork = 'PowerShell'