Skip to content

Commit

Permalink
make a note about using '--root' option in documentation for building…
Browse files Browse the repository at this point in the history
… the cache file.

Also add example when specifying a file path causes an error.
  • Loading branch information
shahzebsiddiqui committed Feb 13, 2024
1 parent 8bca621 commit effb57b
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions docs/gettingstarted/buildspecs_interface.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,23 @@ or pass them via command line.
buildtest will search buildspecs in :ref:`buildspecs root <buildspec_roots>` defined in your configuration,
which is a list of directory paths to search for buildspecs.
If you want to load buildspecs from a directory path, you can specify a directory
via ``--root`` option in the format: ``buildtest buildspec find --root <path> --rebuild``.
buildtest will load all valid buildspecs into cache and ignore
the rest. It's important to add ``--rebuild`` if you want to regenerate buildspec cache.
via ``--root`` option in the format: ``buildtest buildspec find --root <path>``.
buildtest will rebuild cache when `--root` option is specified. Note that to rebuild cache you typically
need to pass `--rebuild` option but that is not required when using `--root` option because we want
buildtest to load buildspecs into cache.

The `--root` option must be path to a directory, if you specify a file path, buildtest will report an error message

.. dropdown:: ``buildtest buildspec find --root $BUILDTEST_ROOT/README.rst``
:color: warning

.. command-output:: buildtest buildspec find --root $BUILDTEST_ROOT/README.rst
:returncode: 1

Let's rebuild the cache again by running ``buildtest buildspec find`` which will load the default buildspecs into the cache and suppress
the output

.. command-output:: buildtest buildspec find --rebuild --quiet

Filtering buildspec
~~~~~~~~~~~~~~~~~~~~
Expand Down

0 comments on commit effb57b

Please sign in to comment.