Skip to content

Commit

Permalink
add scenario validation
Browse files Browse the repository at this point in the history
  • Loading branch information
Piotr1215 committed Feb 15, 2025
1 parent f63ec17 commit 2816fe0
Show file tree
Hide file tree
Showing 6 changed files with 474 additions and 171 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -173,3 +173,4 @@ poetry.toml
# LSP config files
pyrightconfig.json

.aider*
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,30 @@ the current working directory and **remove** the temporary directory.
Assets are NOT automatically added to the `index.json` to leave the decision to
the user how to bring the assets into the scenario.

### Validating courses

The `killercoda-cli validate` command allows you to validate the structure and configuration of your scenarios:

```console
killercoda-cli validate

=== Scenario Validation ===
[+]json-syntax ok
[+]step-1 ok
[+]step-2 ok

Validation Status: PASSED
Location: /scenario/folder
```

This command checks:
- Presence and validity of index.json files
- Required fields in configuration
- Existence of all referenced files
- Step structure and consistency

The validation command is useful for CI/CD pipelines to ensure course integrity before deployment.

## Development

Installing locally with `pip install -e . --user` will allow you to run the tool
Expand Down
2 changes: 1 addition & 1 deletion killercoda_cli/__about__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
#
# SPDX-License-Identifier: MIT
# This is setup in build process in CI, but also servers as a record for the --version flag
__version__ = "1.1.5"
__version__ = "1.2.0"
Loading

0 comments on commit 2816fe0

Please sign in to comment.