-
Notifications
You must be signed in to change notification settings - Fork 16
Add Examples #179
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
Merged
Merged
Add Examples #179
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
5f21761
Add examples configs with unit tests
shanejbrown 0bae85d
Add better documentation for examples
shanejbrown fbb01bf
Update README files
shanejbrown dd35ec5
Update example readme with how to run buildrunner
shanejbrown 0dcc360
Simplify running example configs instructions
shanejbrown File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| ================================== | ||
| Buildrunner Example Configurations | ||
| ================================== | ||
|
|
||
| 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. | ||
|
|
||
| Running Buildrunner with Example Configuration Files | ||
| ==================================================== | ||
|
|
||
| To run Buildrunner using an example configuration file, follow these steps from the root directory of the Buildrunner repository: | ||
|
|
||
| 1. **Navigate to the Buildrunner repository directory.** | ||
|
|
||
| 2. **Install Buildrunner:** | ||
| .. code-block:: sh | ||
|
|
||
| pip install . | ||
|
|
||
| *Tip: It is recommended to install Buildrunner within a virtual environment to avoid conflicts with system-wide dependencies.* | ||
|
|
||
|
|
||
| 3. **Execute Buildrunner with a specified configuration file:** | ||
| .. code-block:: sh | ||
|
|
||
| ./bin/buildrunner -f examples/<path-to-config-file> | ||
| or | ||
| buildrunner -f examples/<path-to-config-file> | ||
|
|
||
| *Example:* | ||
|
|
||
| .. code-block:: sh | ||
|
|
||
| buildrunner -f examples/configs/build/basic/buildrunner.yaml | ||
|
|
||
| Adding a New Example Configuration File | ||
| ======================================= | ||
|
|
||
| To contribute a new example configuration file, adhere to the following guidelines: | ||
|
|
||
| 1. **File Location & Naming** | ||
| - Place the new file in the ``examples/`` directory. | ||
| - Ensure the filename ends with ``.buildrunner.yaml`` to allow automatic detection and execution by unit tests. | ||
|
|
||
| 2. **Configuration Validity** | ||
| - The configuration file must contain a valid Buildrunner configuration. | ||
| - It should execute successfully using the standard instructions provided in this repository without requiring any manual intervention. | ||
|
|
||
| 3. **Documentation & Additional Files** | ||
| - If necessary, include a ``README.rst`` file in the same directory as the configuration file to provide additional details or instructions. | ||
| - Any supporting files required for the configuration should be placed alongside the configuration file. | ||
|
|
||
| Following these best practices ensures consistency, maintainability, and ease of use for all contributors and users. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # Basic buildrunner configuration to build a simple Docker image. | ||
| steps: | ||
| simple-build-step: | ||
| build: | ||
| dockerfile: | | ||
| FROM busybox:latest | ||
| RUN echo Hello World |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| # Basic buildrunner configuration to run a simple Docker image. | ||
| steps: | ||
| simple-run-step: | ||
| run: | ||
| image: busybox:latest | ||
| cmd: echo Hello World |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can also skip Step #2 and then just do
PYTHONPATH=. bin/buildrunnerI believe. That's what I typically do to use the latest code.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is even better. I'll make the update.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's updated