27 lines
1,003 B
Text
27 lines
1,003 B
Text
|
|
#!/usr/bin/env nu
|
||
|
|
use lib/runner.nu [run-reflection-mode, print-summary-and-exit]
|
||
|
|
|
||
|
|
def main [
|
||
|
|
--orchestrator-url: string = "http://127.0.0.1:9011",
|
||
|
|
--zot-url: string = "http://zot.wuji.local:5000",
|
||
|
|
--golden-image-max-age-days: int = 14,
|
||
|
|
--extensions-root: string = "",
|
||
|
|
--provisioning-root: string = "",
|
||
|
|
]: nothing -> nothing {
|
||
|
|
let root = if not ($provisioning_root | is-empty) {
|
||
|
|
$provisioning_root
|
||
|
|
} else {
|
||
|
|
$env | get -o PROVISIONING_ROOT | default ($env.FILE_PWD | path join ".." | path expand)
|
||
|
|
}
|
||
|
|
|
||
|
|
let ext_root = if not ($extensions_root | is-empty) { $extensions_root } else { $"($root)/catalog/components" }
|
||
|
|
|
||
|
|
let results = run-reflection-mode $"($root)/reflection/modes/validate-build-infrastructure.ncl" {
|
||
|
|
orchestrator_url: $orchestrator_url,
|
||
|
|
zot_url: $zot_url,
|
||
|
|
golden_image_max_age_days: ($golden_image_max_age_days | into string),
|
||
|
|
extensions_root: $ext_root,
|
||
|
|
} $root
|
||
|
|
print-summary-and-exit $results
|
||
|
|
}
|