|
@ -42,10 +42,23 @@ jobs: |
|
|
failOnStderr: true |
|
|
failOnStderr: true |
|
|
displayName: 'Create OpenShift Build' |
|
|
displayName: 'Create OpenShift Build' |
|
|
condition: and(succeeded(), eq(variables['BuildExists'], False)) |
|
|
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' |
|
|
displayName: 'Start OpenShift Binary Build' |
|
|
continueOnError: true |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|