28 lines
604 B
PowerShell
28 lines
604 B
PowerShell
function Invoke-BuildState {
|
|
<#
|
|
.SYNOPSIS
|
|
Sets final Drone pipeline build state.
|
|
|
|
.DESCRIPTION
|
|
Marks the pipeline ass succeeded of fail based on the custom state file.
|
|
|
|
.INPUTS
|
|
[None] No pipeline input.
|
|
|
|
.OUTPUTS
|
|
[None] No pipeline output.
|
|
|
|
.EXAMPLE
|
|
Invoke-BuildState
|
|
#>
|
|
[CmdletBinding()]
|
|
param()
|
|
|
|
process {
|
|
$Repo = Get-RepoPath
|
|
if ( Test-Path -Path $Repo.FailureLogPath ) {
|
|
throw 'One one more pipeline steps failed. Marking the pipeline as failed!'
|
|
}
|
|
}
|
|
}
|