Closed kanadaj closed 3 years ago
Thanks for reaching out.
You can use --quiet
to suppress the output altogether. That should help resolve the immediate issue.
The behavior is consistent across Podman and Buildah, but Docker does not write to stderr unless there's an error. @rhatdan, do you recall what the reasoning was?
I think stderr is the correct behavior, stderr is not meant only for errors but also for diagnostic messages
Yes the idea was to allow users to get the image id, while the rest was diagnostic.
imageid=$(buildah bud /tmp/)
@rhatdan I feel it'd be better for CI/CD systems to be able to direct diagnostics to stdout to be able to detect errors just by listening to stderr, a flag would be nice for this.
Interested in opening a PR?
Buildah's internals are incredibly alien to me, I would do it otherwise but it'd probably take me far too long :(
Well in Bash this is fairly easy to redirect stderr to stdout
buildah push ... 2>&1
Or turn off the push processing with
buildah push -q ...
So I am going to close this as wont fix.
BUG REPORT INFORMATION
Description
buildah push on Azure Pipelines seems to write to stderr even though there is no indication of an error. This makes it so
failOnStderr
cannot be used to abort a release if the pipeline fails to push the built image.Steps to reproduce the issue:
buildah bud
Describe the results you received:
Describe the results you expected:
Output results only to stdout, I see no reason for an error anywhere in that code above, and disabling
failOnStderr
leads to a successful release.Output of
rpm -q buildah
orapt list buildah
:Output of
buildah version
:*Output of `cat /etc/release`:**
Output of
uname -a
:Output of
cat /etc/containers/storage.conf
: