Updated start-build task
This commit is contained in:
parent
8ef7c6fd7b
commit
ddb4ad5603
@ -42,10 +42,23 @@ jobs:
|
||||
failOnStderr: true
|
||||
displayName: 'Create OpenShift Build'
|
||||
condition: and(succeeded(), eq(variables['BuildExists'], False))
|
||||
- script: 'oc start-build $(AppName) --from-dir="$(Pipeline.Workspace)\$(ProjectName)" --follow --wait'
|
||||
failOnStderr: true
|
||||
- powershell: |
|
||||
$pinfo = New-Object System.Diagnostics.ProcessStartInfo
|
||||
$pinfo.FileName = "oc.exe"
|
||||
$pinfo.RedirectStandardError = $true
|
||||
$pinfo.RedirectStandardOutput = $true
|
||||
$pinfo.UseShellExecute = $false
|
||||
$pinfo.Arguments = "oc start-build $(AppName) --from-dir='$(Pipeline.Workspace)\$(ProjectName)' --follow --wait"
|
||||
$p = New-Object System.Diagnostics.Process
|
||||
$p.StartInfo = $pinfo
|
||||
$p.Start() | Out-Null
|
||||
$p.WaitForExit()
|
||||
$stdout = $p.StandardOutput.ReadToEnd()
|
||||
$stderr = $p.StandardError.ReadToEnd()
|
||||
Write-Host "stdout: $stdout"
|
||||
Write-Host "stderr: $stderr"
|
||||
Write-Host "exit code: " + $p.ExitCode
|
||||
displayName: 'Start OpenShift Binary Build'
|
||||
continueOnError: true
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user