-
Notifications
You must be signed in to change notification settings - Fork 3k
Fixed the printing message. #22301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed the printing message. #22301
Changes from 2 commits
4a3b2a5
dc0adae
aa340f7
5fcc028
6886cd4
e982f3c
e0591cd
9857609
44e4401
1105789
25740a2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -204,24 +204,25 @@ function DockerValidation{ | |
[string]$workingDirectory | ||
) | ||
if ($PackageSourceOverride) { | ||
docker run -v "${workingDirectory}:/workdir/out" -e TARGET_PACKAGE=$packageName -e TARGET_VERSION=$packageVersion ` | ||
$commandLine = docker run -v "${workingDirectory}:/workdir/out" -e TARGET_PACKAGE=$packageName -e TARGET_VERSION=$packageVersion ` | ||
-e EXTRA_INDEX_URL=$PackageSourceOverride -t $DocValidationImageId 2>&1 | Out-Null | ||
} | ||
else { | ||
docker run -v "${workingDirectory}:/workdir/out" ` | ||
$commandLine = docker run -v "${workingDirectory}:/workdir/out" ` | ||
-e TARGET_PACKAGE=$packageName -e TARGET_VERSION=$packageVersion -t $DocValidationImageId 2>&1 | Out-Null | ||
} | ||
# The docker exit codes: https://docs.docker.com/engine/reference/run/#exit-status | ||
# If the docker failed because of docker itself instead of the application, | ||
# we should skip the validation and keep the packages. | ||
|
||
if ($LASTEXITCODE -eq 125 -Or $LASTEXITCODE -eq 126 -Or $LASTEXITCODE -eq 127) { | ||
Write-Host $commandLine | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this is always going to be empty because you are piping to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I will put the message to debug level. Then, we can rerun the pipeline by turn on 'System.debug' |
||
LogWarning "The `docker` command does not work with exit code $LASTEXITCODE. Fall back to npm install $packageName directly." | ||
FallbackValidation -packageName "$packageName" -packageVersion "$packageVersion" -workingDirectory $workingDirectory -PackageSourceOverride $PackageSourceOverride | ||
} | ||
elseif ($LASTEXITCODE -ne 0) { | ||
Write-Host $commandLine | ||
LogWarning "Package $($Package.name) ref docs validation failed." | ||
LogWarning "Package $packageName ref docs validation failed." | ||
return $false | ||
} | ||
return $true | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you want to remove the Out-Null here as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. That's for testing purpose.
I am kicking a pipeline.
https://dev.azure.com/azure-sdk/internal/_build/results?buildId=1276768&view=results