Skip to content

Commit 0bae85d

Browse files
committed
Add better documentation for examples
1 parent 5f21761 commit 0bae85d

File tree

3 files changed

+29
-13
lines changed

3 files changed

+29
-13
lines changed

examples/README.rst

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,50 @@
22
Buildrunner Example Configurations
33
==================================
44

5-
This directory contains several example configuration files for Buildrunner.
5+
This directory contains example configuration files for Buildrunner, demonstrating various use cases and best practices. These examples serve as references for users looking to configure and execute Buildrunner effectively.
66

77
Running Buildrunner with Example Configuration Files
8-
""""""""""""""""""""""""""""""""""""""""""""""""""""
8+
====================================================
99

10-
To run Buildrunner using the example configuration files, execute the following commands from
11-
the top-level directory within the Buildrunner repository.
10+
To run Buildrunner using an example configuration file, follow these steps from the root directory of the Buildrunner repository:
1211

12+
1. **Navigate to the Buildrunner repository directory.**
1313

14-
1. **Install Buildrunner:**
14+
2. **Install Buildrunner (Recommended: Use a Virtual Environment)**
15+
16+
It is recommended to install Buildrunner within a virtual environment to avoid conflicts with system-wide dependencies.
1517

1618
.. code-block:: sh
1719
1820
pip install .
1921
20-
2. **Run Buildrunner:**
22+
3. **Execute Buildrunner with a specified configuration file:**
2123

2224
.. code-block:: sh
2325
24-
./bin/buildrunner -f examples/<name_of_config_file>
26+
./bin/buildrunner -f examples/<path-to-config-file>
2527
2628
For example:
2729

2830
.. code-block:: sh
2931
3032
./bin/buildrunner -f examples/configs/build/basic/buildrunner.yaml
3133
32-
Adding New Example Configuration Files
33-
""""""""""""""""""""""""""""""""""""""
34-
To add a new example configuration file, add a new file under the `examples/` directory. The new file should end with ``buildrunner.yaml`` to ensure that
35-
the unit tests can automatically detect and run the new example configuration file. The new file should contain a valid Buildrunner configuration and should be able
36-
to run successfully using the instructions provided above with no other manual setup. If needed, add a README.rst file to the same directory as the configuration file
37-
to provide additional information. Any additional files needed by the configuration should be colocated with the configuration file.
34+
Adding a New Example Configuration File
35+
=======================================
36+
37+
To contribute a new example configuration file, adhere to the following guidelines:
38+
39+
1. **File Location & Naming**
40+
- Place the new file in the ``examples/`` directory.
41+
- Ensure the filename ends with ``.buildrunner.yaml`` to allow automatic detection and execution by unit tests.
42+
43+
2. **Configuration Validity**
44+
- The configuration file must contain a valid Buildrunner configuration.
45+
- It should execute successfully using the standard instructions provided in this repository without requiring any manual intervention.
46+
47+
3. **Documentation & Additional Files**
48+
- If necessary, include a ``README.rst`` file in the same directory as the configuration file to provide additional details or instructions.
49+
- Any supporting files required for the configuration should be placed alongside the configuration file.
50+
51+
Following these best practices ensures consistency, maintainability, and ease of use for all contributors and users.

examples/build/basic/buildrunner.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Basic buildrunner configuration to build a simple Docker image.
12
steps:
23
simple-build-step:
34
build:

examples/run/basic/buildrunner.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Basic buildrunner configuration to run a simple Docker image.
12
steps:
23
simple-run-step:
34
run:

0 commit comments

Comments
 (0)