Pipeline upload failed without details
muhlba91 opened this issue · 4 comments
I have a simple pipeline like this:
Buildkite::Builder.pipeline do
command do
label "echo"
command "true"
end
end
Upon execution I receive the error:
gusto/buildkite-builder:3.0.0 buildkite-builder run alt
+++ 🧰 �[38;5;48mBuildkite Builder�[0m ─ �[33m.buildkite/pipelines/alt�[0m
�[38;5;102m
Processing �[0m�[38;5;48mBuildkite::Builder::Extensions::Use�[0m
�[38;5;48m└──�[0m�[38;5;102m Finished in 0.0 seconds�[0m
�[38;5;102m
Processing �[0m�[38;5;48mBuildkite::Builder::Extensions::Lib�[0m
�[38;5;48m└──�[0m�[38;5;102m Finished in 0.0 seconds�[0m
�[38;5;102m
Processing �[0m�[38;5;48mBuildkite::Builder::Extensions::Env�[0m
�[38;5;48m└──�[0m�[38;5;102m Finished in 0.0 seconds�[0m
�[38;5;102m
Processing �[0m�[38;5;48mBuildkite::Builder::Extensions::Notify�[0m
�[38;5;48m└──�[0m�[38;5;102m Finished in 0.0 seconds�[0m
�[38;5;102m
Processing �[0m�[38;5;48mBuildkite::Builder::Extensions::Steps�[0m
�[38;5;48m└──�[0m�[38;5;102m Finished in 0.0 seconds�[0m
�[38;5;48m
Done (0.01 seconds)�[0m
+++ :pipeline: Uploading pipeline
Pipeline upload failed, saving as artifact…
�[31m🚨 Error: The command exited with status 1�[0m
^^^ +++
^^^ +++
user command error: The plugin docker command hook exited with status 1
Unfortunately, I do not get any other information on the error. Any ideas on how to solve that?
As the code is right now, it looks like we are calling system
which wouldn't include output of the command:
buildkite-builder/lib/buildkite/pipelines/command.rb
Lines 45 to 47 in 685a90d
buildkite-builder/lib/buildkite/builder/pipeline.rb
Lines 55 to 59 in 685a90d
I suspect this would need to be changed to get more details about what failed. It seems it should save the pipeline.yml as a n artifact so you can review. With that, it should be possible to download and then use buildkite-agent pipeline upload <path/to/yaml>
to see if it has any clues.
thanks for the hint!
unfortunately, it also doesn‘t upload the artifact.
EDIT: i tried to execute buildkite-agent pipeline upload <CHILD_PIPELINE>
whereas CHILD_PIPELINE refers to a file containing the output of running the builder with preview
. this worked without problems and the child pipeline got executed.
issue solved - i was running the agent in docker and didn't expose the buildkite-agent binary correctly!
Nice! I made an issue to figure out better debugging output #65