Skip to content

Instantly share code, notes, and snippets.

@Dalmirog-zz
Last active January 12, 2016 19:07
Show Gist options
  • Save Dalmirog-zz/fb22b8350a6acfb8f9e1 to your computer and use it in GitHub Desktop.
Save Dalmirog-zz/fb22b8350a6acfb8f9e1 to your computer and use it in GitHub Desktop.
Script for alan
function GetScriptDirectory
{
Split-Path $script:MyInvocation.MyCommand.Path
}
function GetResultsPath
{
$parent = join-path -path $(GetScriptDirectory) -childpath $OctopusReleaseNumber
return Join-Path -Path $parent -ChildPath "TestResult.html"
}
function Main
{
$exitCode = 0
Try
{
Push-Location $(GetScriptDirectory)
& .\RunTests.ps1 -OutputPath "$OctopusReleaseNumber"
$exitCode = $LastExitCode
#Dalmiro's line
$filePath = GetResultsPath
If(Test-Path $filePath){
"File exists: $filePath"
}
else{
"File not found: $filePath"
}
#end
New-OctopusArtifact -Path $(GetResultsPath)
Write-Host "Published to " $(GetResultsPath)
}
Catch
{
$exitCode = 1
Write-Host "Exception: $($_.Exception.Message)"
}
Finally
{
Pop-Location
}
exit 0
}
Main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment