OCram85/DroneHelper
OCram85
/
DroneHelper
Archived
1
0
Fork 0
This repository has been archived on 2023-10-10. You can view files and clone it, but cannot push or open issues or pull requests.
DroneHelper/src/State/Invoke-BuidState.ps1

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!'
}
}
}