Browse Source

Updated start-build task

pull/1259/head
Tim McCarthy 5 years ago
parent
commit
ddb4ad5603
1 changed files with 16 additions and 3 deletions
  1. +16
    -3
      build/aro/webapp-container-build.yml

+ 16
- 3
build/aro/webapp-container-build.yml View File

@ -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…
Cancel
Save