Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
lemeurherve committed Jul 31, 2023
1 parent 7d7148a commit 86b69e6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pipeline {

stages {
stage('docker-agent') {
failFast true
// failFast true
matrix {
axes {
axis {
Expand Down
1 change: 1 addition & 0 deletions tests/agent.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ Describe "[$global:AGENT_IMAGE] can be built with custom build arguments" {
Push-Location -StackName 'agent' -Path "$PSScriptRoot/.."

$exitCode, $stdout, $stderr = Run-Program 'docker' "build --build-arg `"VERSION=${global:TEST_VERSION}`" --build-arg `"WINDOWS_FLAVOR=${global:WINDOWS_FLAVOR}`" --build-arg `"WINDOWS_VERSION_TAG=${global:WINDOWS_VERSION_TAG}`" --build-arg `"WINDOWS_VERSION_FALLBACK_TAG=${global:WINDOWS_VERSION_FALLBACK_TAG}`" --build-arg `"user=${global:TEST_USER}`" --build-arg `"AGENT_WORKDIR=${global:TEST_AGENT_WORKDIR}`" -t ${global:AGENT_IMAGE} ${global:IMAGE_FOLDER}"
# TODO: remove
Write-Host '========================= stdoout ==================================='
Write-Host $stdout
Write-Host '========================= stderr ==================================='
Expand Down
5 changes: 4 additions & 1 deletion tests/test_helpers.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,10 @@ function Run-Program($cmd, $params) {
$stderr = $proc.StandardError.ReadToEnd()
$proc.WaitForExit()
if($proc.ExitCode -ne 0) {
Write-Host "`n`nstdout:`n$stdout`n`nstderr:`n$stderr`n`ncmd:`n$cmd`n`nparams:`n$param`n`n"
Write-Verbose "[err] stdout:`n$stdout"
Write-Verbose "[err] stderr:`n$stderr"
Write-Verbose "[err] cmd:`n$cmd"
Write-Verbose "[err] params:`n$param"
}

return $proc.ExitCode, $stdout, $stderr
Expand Down

0 comments on commit 86b69e6

Please sign in to comment.