Skip to content

Commit

Permalink
add PR build to mock official build
Browse files Browse the repository at this point in the history
  • Loading branch information
brettfo committed Oct 14, 2020
1 parent e870afe commit 663c417
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
12 changes: 11 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,16 @@ stages:
continueOnError: true
condition: failed()

# Mock official build
- job: MockOfficial
pool:
vmImage: windows-2019
steps:
- checkout: self
clean: true
- pwsh: .\eng\MockBuild.ps1
displayName: Build with OfficialBuildId

# Linux
- job: Linux
pool:
Expand Down Expand Up @@ -311,7 +321,7 @@ stages:
- checkout: self
clean: true
- script: .\Build.cmd -c Release
- script: .\tests\EndToEndBuildTests\EndToEndBuildTests -c Release
- script: .\tests\EndToEndBuildTests\EndToEndBuildTests.cmd -c Release
displayName: End to end build tests

# Source Build Windows
Expand Down
17 changes: 17 additions & 0 deletions eng/MockBuild.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Set-StrictMode -version 2.0
$ErrorActionPreference = "Stop"
$BuildCategory = ""
$BuildMessage = ""

try {
$fakeBuildId = (Get-Date -Format "yyyyMMdd") + ".0"
$visualStudioDropName = "Products/mock/dotnet-fsharp/branch/$fakeBuildId"
.\Build.ps1 -build -restore -ci -bootstrap -binaryLog -pack -configuration Release /p:OfficialBuildId=$fakeBuildId /p:VisualStudioDropName=$visualStudioDropName
}
catch {
Write-Host $_
Write-Host $_.Exception
Write-Host $_.ScriptStackTrace
Write-PipelineTelemetryError -Category $script:BuildCategory -Message $script:BuildMessage
ExitWithExitCode 1
}

0 comments on commit 663c417

Please sign in to comment.