Name | minilayer JSON |
Version |
0.3.7
JSON |
| download |
home_page | |
Summary | |
upload_time | 2023-03-30 17:16:13 |
maintainer | |
docs_url | None |
author | Daniel Braun |
requires_python | |
license | |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# MiniLayer CLI
## Installation
`pip install minilayer[generate]`
### Feature Generation:
```
Usage: python -m minilayer generate devcontainer-feature [OPTIONS]
FEATURE_DEFINITION
OUTPUT_DIR
Arguments:
FEATURE_DEFINITION [required]
OUTPUT_DIR [required]
Options:
--help Show this message and exit.
```
Input for feature generation is a `feature-definition.json` file
This is an *extended* version of the [devcontainer-feature.json](https://containers.dev/implementors/features/#devcontainer-feature-json-properties) file with *additional fields*:
```yaml
{
...
regular devcontainer-json fields like id, name, description etc
...
# dependencies are list of features and options (those will be installed as prerequisites to your feature)
"dependencies": [
{
"feature": "ghcr.io/devcontainers-contrib/features/asdf-package:latest",
"options": {
"plugin": "act",
"version": "latest"
}
}
],
# This command will be executed after the dependency feature list has been installed
"install_command": "echo 'Done'",
# this example test scenario checks the default options (empty options dict), each test_command should exit wth code `0` if your feature is installed correctly.
"test_scenarios": [
{
"name": "test_defaults",
"image": "mcr.microsoft.com/devcontainers/base:debian",
"test_commands": [
"act --version"
],
"options": {}
}
]
}
```
#### redirect input
```yaml
{
...
"options": {
"version": {
"type": "string",
"default": "latest",
"description": "Select the version of act to install2."
}
},
# you can also redirect one of your actual devcontainer-feature.json options values into a dependency input, note the `$options.version` pointer to the asdf-package version option
"dependencies": [
{
"feature": "ghcr.io/devcontainers-contrib/features/asdf-package:latest",
"options": {
"plugin": "act",
"version": "$options.version"
}
}
],
...
}
```
### Usage example
this will generate the Elixir feature
It assumes you have the minilayer cli already installed
```sh
git clone https://github.com/devcontainers-contrib/cli --depth 1
cd cli
minilayer generate devcontainer-feature "./test/resources/test_feature_definitions/elixir-asdf/feature-definition.json" "./output_dir"
```
Raw data
{
"_id": null,
"home_page": "",
"name": "minilayer",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "Daniel Braun",
"author_email": "",
"download_url": "",
"platform": null,
"description": "# MiniLayer CLI\n\n\n## Installation\n\n\n`pip install minilayer[generate]`\n\n\n### Feature Generation:\n\n```\nUsage: python -m minilayer generate devcontainer-feature [OPTIONS]\n FEATURE_DEFINITION\n OUTPUT_DIR\n\nArguments:\n FEATURE_DEFINITION [required]\n OUTPUT_DIR [required]\n\nOptions:\n --help Show this message and exit.\n```\n\n\nInput for feature generation is a `feature-definition.json` file\nThis is an *extended* version of the [devcontainer-feature.json](https://containers.dev/implementors/features/#devcontainer-feature-json-properties) file with *additional fields*:\n\n```yaml\n{ \n ...\n regular devcontainer-json fields like id, name, description etc\n ...\n\n\n # dependencies are list of features and options (those will be installed as prerequisites to your feature)\n \"dependencies\": [\n {\n \"feature\": \"ghcr.io/devcontainers-contrib/features/asdf-package:latest\",\n \"options\": {\n \"plugin\": \"act\",\n\n \"version\": \"latest\"\n }\n }\n ],\n\n # This command will be executed after the dependency feature list has been installed\n \"install_command\": \"echo 'Done'\",\n\n # this example test scenario checks the default options (empty options dict), each test_command should exit wth code `0` if your feature is installed correctly.\n \"test_scenarios\": [\n {\n \"name\": \"test_defaults\",\n \"image\": \"mcr.microsoft.com/devcontainers/base:debian\",\n \"test_commands\": [\n \"act --version\"\n ],\n \"options\": {}\n }\n ]\n}\n```\n\n#### redirect input\n\n```yaml\n{\n ...\n\n\n \"options\": {\n \"version\": {\n \"type\": \"string\",\n \"default\": \"latest\",\n \"description\": \"Select the version of act to install2.\"\n }\n },\n\n # you can also redirect one of your actual devcontainer-feature.json options values into a dependency input, note the `$options.version` pointer to the asdf-package version option\n \"dependencies\": [\n {\n \"feature\": \"ghcr.io/devcontainers-contrib/features/asdf-package:latest\",\n \"options\": {\n \"plugin\": \"act\",\n \"version\": \"$options.version\"\n }\n }\n ],\n\n ...\n}\n```\n\n### Usage example\n\n\nthis will generate the Elixir feature \nIt assumes you have the minilayer cli already installed\n\n```sh\ngit clone https://github.com/devcontainers-contrib/cli --depth 1\ncd cli\n\n\nminilayer generate devcontainer-feature \"./test/resources/test_feature_definitions/elixir-asdf/feature-definition.json\" \"./output_dir\"\n```\n",
"bugtrack_url": null,
"license": "",
"summary": "",
"version": "0.3.7",
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "77a7de811fddbbbc25d3d3b570a9028cdfd5943a28309f368acf120aa3bf4fc4",
"md5": "4ea569df564910da23a597c56b37e433",
"sha256": "6112585b7bb798c3c012c523325f6913ef7cde3afd46d90d1bde0e3132dc2af2"
},
"downloads": -1,
"filename": "minilayer-0.3.7-py3-none-any.whl",
"has_sig": false,
"md5_digest": "4ea569df564910da23a597c56b37e433",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 28590,
"upload_time": "2023-03-30T17:16:13",
"upload_time_iso_8601": "2023-03-30T17:16:13.557401Z",
"url": "https://files.pythonhosted.org/packages/77/a7/de811fddbbbc25d3d3b570a9028cdfd5943a28309f368acf120aa3bf4fc4/minilayer-0.3.7-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-03-30 17:16:13",
"github": false,
"gitlab": false,
"bitbucket": false,
"lcname": "minilayer"
}