Skip to content
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

Make fatbuildrctl --watch the new default #162

Merged
merged 4 commits into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
commands in `fatbuildrctl` manpage.

### Changed
- cli: Watch task output by default when submitting tasks. The `-w, --watch`
option is replaced by the opposite `--batch` option to submit tasks in
background (#123).
- docs:
- Update table of available remote features with new registry content
listing and artifact deletion possibilities.
- Mention possibility of HTTP/404 response code on supported derivative in
REST API reference.
- Split documentation of `images` command options by subcommands in manpage.
- Replace `-w, --watch` option by opposite `--batch` option in manpage.
- Remove mention of `--watch` options in various pages of documentation.

### Fixed
- Fix crash on client side when loading artifact definition for OSI builds
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/admin/pages/purge.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ submitting an history purge task with this command:

[source,console]
----
$ fatbuildrctl history purge [-w,--watch]
$ fatbuildrctl history purge [--batch]
----

## Automatic purge
Expand Down
8 changes: 4 additions & 4 deletions docs/modules/install/pages/quickstart.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ pipelines:

[source,shell]
----
$ fatbuildrctl images --create --watch
$ fatbuildrctl images --create
----

This command submits tasks to create one container image per artifact format
Expand All @@ -246,7 +246,7 @@ command:

[source,shell]
----
$ fatbuildrctl images --create-envs --watch
$ fatbuildrctl images --create-envs
----

This submits tasks to create all build environments required for every
Expand All @@ -265,7 +265,7 @@ Fatbuildr installation:
----
$ fatbuildrctl build --artifact hello --distribution bullseye \
--basedir /usr/share/doc/fatbuildr/examples \
--name 'John Doe' --email john.doe@company.tld --message "First build!" --watch
--name 'John Doe' --email john.doe@company.tld --message "First build!"
----

This submits a task to:
Expand All @@ -291,7 +291,7 @@ Then you can build your first RPM package:
----
$ fatbuildrctl build --artifact hello --distribution el8 \
--basedir /usr/share/doc/fatbuildr/examples \
--message "First RPM build!" --watch
--message "First RPM build!"
----

This submits a task to build RPM packages of the same GNU Hello software for
Expand Down
54 changes: 28 additions & 26 deletions docs/modules/usage/pages/fatbuildrctl.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -110,16 +110,16 @@ This command accepts the following options:
required, unless a default build message is defined in user preferences file
(see <<man-pref,*PREFERENCES FILE*>> for more details).

*-w, --watch*::
Wait for build task to run and print its output until it is over.
*--batch*::
Submit task in background.

*-i, --interactive*::
Submit build in interactive mode. In this mode, users drop into an interactive
shell inside the build environment in case of build failure. By launching
commands in this interactive shell, users can more easily diagnose the cause
of the build issue and eventually find solution. This argument implies
`--watch`. This mode is available only when the Fatbuildr server is accessed
locally on D-Bus.
of the build issue and eventually find solution. When this option is used,
`--batch` option is ignored. This mode is available only when the Fatbuildr
server is accessed locally on D-Bus.

NOTE: *-n, --name*, *-e, --email* and *-m, --msg* options are not actually used
for _osi_ format artifacts as this format does not contain changelogs.
Expand Down Expand Up @@ -155,9 +155,8 @@ for _osi_ format artifacts as this format does not contain changelogs.
_bar_. The _baz_ derivate must be declared in instance pipelines definitions
and `artifact.yml` file of artifact definition directory.

`$ fatbuildrctl build --artifact foo --distribution bar --watch`::
Submit task to build artifact _foo_ for distribution _bar_, then wait for the
build task to start and print its output until it is over.
`$ fatbuildrctl build --artifact foo --distribution bar --batch`::
Submit task to build artifact _foo_ for distribution _bar_ in background.

`$ fatbuildrctl build --artifact foo --distribution bar --interactive`::
Submit task to build artifact _foo_ for distribution _bar_, then wait for the
Expand Down Expand Up @@ -187,8 +186,8 @@ This command accepts the following subcommands:

The command accepts the following options:

*-w, --watch*::
Wait for purge task to run and print its output until it is over.
*--batch*::
Submit task in background.

*Examples:*

Expand All @@ -198,10 +197,10 @@ The command accepts the following options:

`$ fatbuildrctl history purge`::
Submit task to purge tasks history with their workspaces according to the
policy defined on server side in background.
policy defined on server side.

`$ fatbuildrctl history purge --watch`::
Submit task to purge tasks history and watch its output until its completion.
`$ fatbuildrctl history purge --batch`::
Submit task to purge tasks history in background.
--
*images*::

Expand All @@ -225,8 +224,8 @@ The *create* subcommand accepts the following options:
Force creation of container images even if already existing. Without this
option, creating container image that already exists gives an error.

*-w, --watch*::
Wait for task to run and print its output until it is over.
*--batch*::
Submit task in background.

*update*:::
Submit tasks to update OS packages of container images. Unless *-f, --format*
Expand All @@ -238,8 +237,8 @@ The *update* subcommand accepts the following options:
*-f, --format*=_FORMAT_::
Update container image specific to format _FORMAT_.

*-w, --watch*::
Wait for task to run and print its output until it is over.
*--batch*::
Submit task in background.

*shell*:::
Submit a task to launch an interactive shell or execute a command as root in a
Expand All @@ -256,6 +255,10 @@ The *shell* subcommand accepts the following options:
Command to execute in container image. Without this option, an interative
shell is launched.

*command*::
Command to execute in container image. Without this option, an interative
shell is launched.

*env-create*:::
Submit tasks to create the build environments in the container images. Unless
*-f, --format*, *-d, --distribution* or *-a, --architecture* filters are used,
Expand All @@ -274,8 +277,8 @@ The *env-create* subcommand accepts the following options:
*-a, --architecture*=_ARCHITECTURE_::
Create build environments for the hardware architecture _ARCHITECTURE_.

*-w, --watch*::
Wait for task to run and print its output until it is over.
*--batch*::
Submit task in background.

*env-update*:::
Submit tasks to update the build environments in the container images. Unless
Expand All @@ -295,8 +298,8 @@ The *env-update* subcommand accepts the following options:
*-a, --architecture*=_ARCHITECTURE_::
Update build environments for the hardware architecture _ARCHITECTURE_.

*-w, --watch*::
Wait for task to run and print its output until it is over.
*--batch*::
Submit task in background.

*env-shell*:::
Submit a task to launch an interactive shell or execute command as root in a
Expand Down Expand Up @@ -325,9 +328,8 @@ The *env-shell* subcommand accepts the following options:
Submit tasks to create container images for all formats declared in instance
pipelines.

`$ fatbuildrctl images update --format rpm --watch`::
Submit tasks to update container image for RPM format and watch its output
until its completion.
`$ fatbuildrctl images update --format rpm --batch`::
Submit tasks to update container image for RPM format in background.

`$ fatbuildrctl images shell --format rpm`::
Submit tasks to open an interactive shell in an instance of a container
Expand All @@ -337,9 +339,9 @@ The *env-shell* subcommand accepts the following options:
Submit tasks to execute `dpkg -l` command in an instance of a container
running the image for Deb format.

`$ fatbuildrctl images env-create --format deb --watch`::
`$ fatbuildrctl images env-create --format deb --batch`::
Submit tasks to create all build environments declared in instance pipelines
for Deb format and watch their outputs until their completion.
for Deb format in background.

`$ fatbuildrctl images env-update --distribution el8`::
Submit tasks to update the build environments declared in instances pipelines
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/usage/pages/utils.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,6 @@ command:

[source,console]
----
$ fatbuildrctl build --artifact hello --basedir ~/base --distribution el8 --watch
$ fatbuildrctl build --artifact hello --basedir ~/base --distribution el8
----

Loading