Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fail fast on build failures of TestPlatform.sln #1243

Merged
merged 6 commits into from
Nov 2, 2017

Conversation

smadala
Copy link
Contributor

@smadala smadala commented Oct 30, 2017

  • Build should fail if there is error in build or publish steps.
  • Build wasn't failing with latest dotnet-cli due to this, But it was failing in "test" step.

@smadala smadala requested a review from navin22 October 30, 2017 10:03
@smadala smadala assigned codito and unassigned codito Oct 30, 2017
@smadala smadala requested review from codito and Faizan2304 October 30, 2017 10:04
@smadala smadala self-assigned this Oct 30, 2017
@@ -190,6 +190,10 @@ function Invoke-Build
& $dotnetExe build $TPB_Solution --configuration $TPB_Configuration -v:minimal -p:Version=$TPB_Version -p:CIBuild=$TPB_CIBuild -p:LocalizedBuild=$TPB_LocalizedBuild
Write-Log ".. .. Build: Complete."

if ($lastExitCode -ne 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we move the logic to check to $lastExitCode to Set-ScriptFailed function?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@@ -604,8 +602,12 @@ function Get-ElapsedTime([System.Diagnostics.Stopwatch] $timer)
return $timer.Elapsed
}

function Set-ScriptFailed
function Set-ScriptFailed-OnError
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: function name doesn't match the Powershell naming convention.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed.

@codito codito merged commit 4df8775 into microsoft:master Nov 2, 2017
@smadala smadala deleted the fail-fast-on-build-fail branch May 23, 2018 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants