As I was re-arranging my recipe files, I needed a way to ensure that the
order of my recipe is correct without having to read through the
generated `Containerfile`. So I added a `-d`/`--display-full-recipe` arg
to `template` that will print out all of your modules in the order
defined by following the `from-file` property.
```
$> bluebuild template --help
Generate a Containerfile from a recipe
Usage: bluebuild template [OPTIONS] [RECIPE]
Arguments:
[RECIPE]
The recipe file to create a template from
Options:
-o, --output <OUTPUT>
File to output to instead of STDOUT
--registry <REGISTRY>
The registry domain the image will be published to.
This is used for modules that need to know where the image is being published (i.e. the signing module).
--registry-namespace <REGISTRY_NAMESPACE>
The registry namespace the image will be published to.
This is used for modules that need to know where the image is being published (i.e. the signing module).
-d, --display-full-recipe
Instead of creating a Containerfile, display the full recipe after traversing all `from-file` properties.
This can be used to help debug the order you defined your recipe.
-t, --syntax-theme <SYNTAX_THEME>
Choose a theme for the syntax highlighting for the Containerfile or Yaml.
The default is `mocha-dark`.
[possible values: mocha-dark, ocean-dark, ocean-light, eighties-dark, inspired-github, solarized-dark, solarized-light]
-s, --squash
Puts the build in a `squash-stage` and COPY's the results to the final stage as one layer.
WARN: This doesn't work with the docker driver as it has been deprecated.
NOTE: Squash has a performance benefit for the newer versions of podman and buildah.
-B, --build-driver <BUILD_DRIVER>
Select which driver to use to build your image
[possible values: buildah, podman, docker]
-v, --verbose...
Increase logging verbosity
-I, --inspect-driver <INSPECT_DRIVER>
Select which driver to use to inspect images
[possible values: skopeo, podman, docker]
-q, --quiet...
Decrease logging verbosity
-h, --help
Print help (see a summary with '-h')
```
Preview of Containerfile/Dockerfile syntax highlighting:

Preview of Yaml highlighting:

101 lines
2.5 KiB
TOML
101 lines
2.5 KiB
TOML
[workspace]
|
|
members = ["utils", "recipe", "template"]
|
|
|
|
[workspace.package]
|
|
description = "A CLI tool built for creating Containerfile templates based on the Ublue Community Project"
|
|
edition = "2021"
|
|
repository = "https://github.com/blue-build/cli"
|
|
license = "Apache-2.0"
|
|
categories = ["command-line-utilities"]
|
|
version = "0.8.4"
|
|
|
|
[workspace.dependencies]
|
|
anyhow = "1"
|
|
chrono = "0.4.35"
|
|
clap = { version = "4", features = ["derive", "cargo", "unicode"] }
|
|
colored = "2.1.0"
|
|
env_logger = "0.11"
|
|
format_serde_error = "0.3.0"
|
|
log = "0.4"
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
serde_yaml = "0.9.30"
|
|
typed-builder = "0.18.1"
|
|
uuid = { version = "1.7.0", features = ["v4"] }
|
|
|
|
[workspace.lints.rust]
|
|
unsafe_code = "forbid"
|
|
|
|
[workspace.lints.clippy]
|
|
correctness = "warn"
|
|
suspicious = "warn"
|
|
perf = "warn"
|
|
style = "warn"
|
|
nursery = "warn"
|
|
pedantic = "warn"
|
|
module_name_repetitions = "allow"
|
|
|
|
[package]
|
|
name = "blue-build"
|
|
build = "build.rs"
|
|
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
description.workspace = true
|
|
repository.workspace = true
|
|
license.workspace = true
|
|
|
|
[package.metadata.release]
|
|
pre-release-hook = ["git", "cliff", "-o", "CHANGELOG.md", "--tag", "{{version}}"]
|
|
pre-release-replacements = [
|
|
{ file = "install.sh", search="VERSION=v\\d+\\.\\d+\\.\\d+", replace = "VERSION=v{{version}}" }
|
|
]
|
|
|
|
[dependencies]
|
|
blue-build-recipe = { version = "=0.8.4", path = "./recipe" }
|
|
blue-build-template = { version = "=0.8.4", path = "./template" }
|
|
blue-build-utils = { version = "=0.8.4", path = "./utils" }
|
|
clap-verbosity-flag = "2"
|
|
clap_complete = "4"
|
|
clap_complete_nushell = "4"
|
|
fuzzy-matcher = "0.3"
|
|
once_cell = "1.19.0"
|
|
open = "5"
|
|
os_info = "3.7" # update os module config and tests when upgrading os_info
|
|
requestty = { version = "0.5", features = ["macros", "termion"] }
|
|
semver = { version = "1.0.22", features = ["serde"] }
|
|
shadow-rs = { version = "0.26" }
|
|
urlencoding = "2.1.3"
|
|
users = "0.11.0"
|
|
|
|
# Workspace dependencies
|
|
anyhow.workspace = true
|
|
chrono.workspace = true
|
|
clap.workspace = true
|
|
colored.workspace = true
|
|
env_logger.workspace = true
|
|
log.workspace = true
|
|
serde.workspace = true
|
|
serde_json.workspace = true
|
|
serde_yaml.workspace = true
|
|
typed-builder.workspace = true
|
|
uuid.workspace = true
|
|
|
|
[features]
|
|
default = []
|
|
|
|
[dev-dependencies]
|
|
rusty-hook = "0.11.2"
|
|
|
|
[build-dependencies]
|
|
shadow-rs = { version = "0.26.1", default-features = false }
|
|
dunce = "1.0.4"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[profile.release]
|
|
lto = true
|
|
codegen-units = 1
|
|
strip = true
|
|
debug = false
|