diff --git a/buildtest/cli/show.py b/buildtest/cli/show.py index 93562c82d..8e52a0c9b 100644 --- a/buildtest/cli/show.py +++ b/buildtest/cli/show.py @@ -134,7 +134,7 @@ def print_buildspec_show(): "buildtest buildspec find --pager", "Paginate output of buildspec cache" ) table.add_row( - "buildtest buildspec find --directory /tmp --rebuild", + "buildtest buildspec find --search /tmp --search $BUILDTEST_ROOT/tutorials/sleep.yml --rebuild", "Discover buildspecs in /tmp and rebuild buildspec cache", ) table.add_row( diff --git a/buildtest/main.py b/buildtest/main.py index 03c18a539..fd2ca1c08 100644 --- a/buildtest/main.py +++ b/buildtest/main.py @@ -251,8 +251,7 @@ def setup(args): # build buildspec cache file automatically if it doesn't exist if not is_file(BUILDSPEC_CACHE_FILE): - root_buildspecs = [] - buildspec_files = [] + search_buildspecs = [] if hasattr(args, "search"): search_buildspecs = args.search diff --git a/buildtest/schemas/examples/settings.schema.json/valid/local-executor.yml b/buildtest/schemas/examples/settings.schema.json/valid/local-executor.yml index 2fd4b1b4e..545bb7918 100644 --- a/buildtest/schemas/examples/settings.schema.json/valid/local-executor.yml +++ b/buildtest/schemas/examples/settings.schema.json/valid/local-executor.yml @@ -20,6 +20,8 @@ system: format: "name,description" # enable terse mode terse: False + # search for buildspecs in these directories + search: ["$BUILDTEST_ROOT/tutorials/containers"] report: count: 25