#961 CLI - Command-line-friendly output for watch-build
Closed: MIGRATED a year ago by nikromen. Opened 4 years ago by iucar.

Consider the workflow described here, in which I submit a batch of builds, wait for them, and repeat unless there was a failure. This is easily scriptable, but the output from watch-build is not very friendly:

  • It says pending, running and then succeeded|failed for each build (several lines of output).
  • The exit code is different if there is a failure (why!?).

So parsing this is a nightmare. If I run watch-build in an automated script, I would like it

  • to wait until all the builds are done, with no output;
  • to have the same exit code (0), unless something really went wrong (an API error, etc.);
  • to have a predictable output to parse at the end.

A predictable output would be: <build_id> <final_status>, one line per build id.


It says pending, running and then succeeded|failed for each build (several lines of output).

It can be pending -> running -> pending -> running ... -> succeded/failed.

The exit code is different if there is a failure (why!?).

To detect build failure?

Machine readable watch-build would be fine, I agree. Patches are welcome!

Metadata Update from @praiskup:
- Issue tagged with: RFE

4 years ago

The exit code is different if there is a failure (why!?).

To detect build failure?

But I expect an exit code != 0 if the command fails, not if a build fails (and the command runs perfectly fine).

The exit status would be hard to change, it's part of our API now, per man page:

EXIT STATUS
       Normally, the exit code is 0 when everything goes well. But if not, we
       could get: 1 - Bad request like wrong project name, insufficient rights
       etc. Also might happen when user interrupts the operation when they
       shouldn’t. 2 - Wrong arguments given. 3 - Bad or no configuration. 4 -
       Build fails when Cli is waiting for the result. 5 - Communication error
       between Cli and server. This issue probably means bug and should be
       reported.

Metadata Update from @praiskup:
- Issue marked as depending on: #88

2 years ago

Metadata Update from @nikromen:
- Issue close_status updated to: MIGRATED
- Issue status updated to: Closed (was: Open)

a year ago

Login to comment on this ticket.

Metadata