prvng_core/nulib/provisioning buildimage
Jesús Pérez 316622a78f
merge(refactor/lazy-loading): ADR-025 lazy-loading complete
557 files merged. Conflicts resolved:
  - CHANGELOG.md: took refactor/lazy-loading (session changelog)
  - versions.ncl: took refactor/lazy-loading (adds typedialog entries)
2026-04-17 23:09:56 +01:00

57 lines
1.7 KiB
Text
Executable file

#!/usr/bin/env nu
use images/state.nu *
use images/create.nu *
use images/list.nu *
use images/delete.nu *
use images/update.nu *
use images/watch.nu *
export def "main help" [--notitles]: nothing -> nothing {
exec $"($env.PROVISIONING_NAME)" help build --notitles
}
def main [
subcmd: string = "help"
role: string = ""
--check (-c)
--infra: string = ""
--provider: string = "hetzner"
--yes (-y)
--interval: int = 60
--auto-build
--notify-only
]: nothing -> nothing {
match $subcmd {
"create" => {
if ($role | is-empty) {
print "Usage: provisioning build image create <role> [--infra <path>] [--check]"
exit 1
}
image-create $role --infra $infra --check=$check
}
"list" => {
image-list --provider $provider
}
"delete" => {
if ($role | is-empty) {
print "Usage: provisioning build image delete <role> [--provider <p>] [--yes]"
exit 1
}
image-delete $role --provider $provider --yes=$yes
}
"update" => {
if ($role | is-empty) {
print "Usage: provisioning build image update <role> [--infra <path>] [--provider <p>]"
exit 1
}
image-update $role --provider $provider --infra $infra --check=$check
}
"watch" => {
image-watch --provider $provider --infra $infra --interval $interval --auto-build=$auto_build --notify-only=$notify_only
}
"help" | "h" | _ => {
exec $"($env.PROVISIONING_NAME)" help build --notitles
}
}
}