chore: improve from-file docs and model naming
This commit is contained in:
parent
63c3d58324
commit
69a9e2cc2f
1 changed files with 21 additions and 19 deletions
|
|
@ -19,7 +19,7 @@ model Recipe {
|
|||
* Allows setting custom tags on the recipe’s final image.
|
||||
* Adding tags to this property will override the `latest` and timestamp tags.
|
||||
*/
|
||||
"alt-tags"?: Array<string>;
|
||||
`alt-tags`?: Array<string>;
|
||||
|
||||
/**
|
||||
* The [OCI](https://opencontainers.org/) image to base your custom image on.
|
||||
|
|
@ -27,22 +27,22 @@ model Recipe {
|
|||
* Universal Blue is recommended. [A list of Universal Blue's images](https://universal-blue.org/images/) can be found on their website
|
||||
* BlueBuild-built images can be used as well.
|
||||
*/
|
||||
"base-image": string;
|
||||
|
||||
`base-image`: string;
|
||||
|
||||
/**
|
||||
* The tag of the base image to build on.
|
||||
* Used to select a version explicitly (`40`) or to always use the latest stable version (`latest`).
|
||||
* A list of all available tags can be viewed by pasting your `base-image` url into your browser.
|
||||
*/
|
||||
"image-version": string | integer;
|
||||
`image-version`: string | integer;
|
||||
|
||||
/**
|
||||
* The tag to pull for the bluebuild cli. This is mostly used for
|
||||
* trying out specific versions of the cli without compiling it locally.
|
||||
**/
|
||||
"blue-build-tag"?: string;
|
||||
`blue-build-tag`?: string;
|
||||
|
||||
/**
|
||||
/**
|
||||
* A list of [stages](https://blue-build.org/reference/stages/) that are executed before the build of the final image.
|
||||
* This is useful for compiling programs from source without polluting the final bootable image.
|
||||
*/
|
||||
|
|
@ -50,7 +50,7 @@ model Recipe {
|
|||
|
||||
/**
|
||||
* A list of [modules](https://blue-build.org/reference/module/) that is executed in order. Multiple of the same module can be included.
|
||||
*
|
||||
*
|
||||
* Each item in this list should have at least a `type:` or be specified to be included from an external file in the `recipes/` directory with `from-file:`.
|
||||
*/
|
||||
modules: Array<Module>;
|
||||
|
|
@ -66,7 +66,7 @@ model StageFull {
|
|||
...Record<Stage>;
|
||||
}
|
||||
|
||||
alias Stage = StageDefault | FromFile;
|
||||
alias Stage = StageDefault | ImportedModule;
|
||||
|
||||
model StageDefault {
|
||||
/**
|
||||
|
|
@ -80,12 +80,12 @@ model StageDefault {
|
|||
|
||||
/** Allows a user to pass in an array of strings that are passed directly into the [`SHELL` instruction](https://docs.docker.com/reference/dockerfile/#shell). */
|
||||
shell?: string;
|
||||
|
||||
|
||||
/**
|
||||
* The list of modules to execute. The exact same syntax used by the main recipe `modules:` property.
|
||||
*/
|
||||
modules: Array<Module>;
|
||||
};
|
||||
}
|
||||
|
||||
@jsonSchema("module-list-v1.json")
|
||||
model ModuleList {
|
||||
|
|
@ -97,25 +97,20 @@ model ModuleFull {
|
|||
...Record<Module>;
|
||||
}
|
||||
|
||||
alias Module = RepoModule | CustomModule | FromFile;
|
||||
|
||||
model FromFile {
|
||||
/** The path to another file containing module definitions **/
|
||||
"from-file": string;
|
||||
}
|
||||
alias Module = RepoModule | CustomModule | ImportedModule;
|
||||
|
||||
model ModuleDefaults {
|
||||
/** Whether to disabling caching for this layer.
|
||||
/** Whether to disabling caching for this layer.
|
||||
* https://blue-build.org/reference/module/#no-cache-optional
|
||||
*/
|
||||
"no-cache"?: boolean = false;
|
||||
`no-cache`?: boolean = false;
|
||||
}
|
||||
|
||||
model CustomModule {
|
||||
/** This is not a built-in module. */
|
||||
type: string;
|
||||
|
||||
/** The URL of the module repository (an OCI image) to pull the module from.
|
||||
/** The URL of the module repository (an OCI image) to pull the module from.
|
||||
* https://blue-build.org/reference/module/#source-optional
|
||||
*/
|
||||
source?: string;
|
||||
|
|
@ -123,3 +118,10 @@ model CustomModule {
|
|||
...ModuleDefaults;
|
||||
...Record<unknown>;
|
||||
}
|
||||
|
||||
model ImportedModule {
|
||||
/** The path to another file containing module configuration to import here.
|
||||
* https://blue-build.org/how-to/multiple-files/
|
||||
*/
|
||||
`from-file`: string;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue