agent icon indicating copy to clipboard operation
agent copied to clipboard

Plugin exit codes from command hooks are not propagated

Open krfricke opened this issue 4 years ago • 1 comments

Is your feature request related to a problem? Please describe.

Command hook exit codes are not propagated to the buildkite agent:

steps:
  - label: ":pipeline:"
    agents:
      queue: runner_queue_branch
    plugins:
      "docker#v3.9.0":
        image: ubuntu
        propagate-environment": True
    command: exit 2

leads to the following output:


🚨 Error: The command exited with status 1
--

user command error: The plugin docker command hook exited with status 1

This could be a follow-up of the original problem in https://github.com/buildkite/agent/issues/754 and is further described here: https://github.com/buildkite-plugins/docker-buildkite-plugin/issues/191

Describe the solution you'd like It would be great if these error codes could be propagated.

Describe alternatives you've considered Running without docker is unfortunately not an option for us because of the build pipeline, so we don't really have an alternative. At the moment we plainly can't use any features associated with exit codes (retries, soft fails, etc).

krfricke avatar Apr 19 '22 09:04 krfricke

The issue is indeed with the docker plugin and a PR was created to solve it (and test it in the future to avoid a regression): https://github.com/buildkite-plugins/docker-buildkite-plugin/pull/213

toote avatar Sep 20 '22 19:09 toote

Version 4.2.1 was released in the docker plugin fixing this issue https://github.com/buildkite-plugins/docker-buildkite-plugin/releases/tag/v4.2.1 :)

toote avatar Sep 22 '22 16:09 toote