-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pre and post script can modify the context. to_decimal handlebars mac…
…ro and bcrypt_hash support
- Loading branch information
Showing
32 changed files
with
474 additions
and
256 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,19 @@ | ||
import "build_context" as build; | ||
fn run(instance, args) { | ||
let context = build::run(instance, args); | ||
import_run("context_pre", instance, context); | ||
let ctx = import_run("context_system", instance, context); | ||
let ctx = import_run("context_pre", instance, context); | ||
if type_of(ctx) == "map" { | ||
context = ctx; | ||
} | ||
ctx = import_run("context_system", instance, context); | ||
if type_of(ctx) == "map" { | ||
context = ctx; | ||
} | ||
let extra = import_run("context_extra", instance, context); | ||
context["extra"] = extra; | ||
import_run("context_post", instance, context); | ||
ctx = import_run("context_post", instance, context); | ||
if type_of(ctx) == "map" { | ||
context = ctx; | ||
} | ||
context | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,22 @@ | ||
fn run(instance, context) { | ||
import_run("delete_pre", instance, context); | ||
let ctx = import_run("delete_pre", instance, context); | ||
if type_of(ctx) == "map" { | ||
context = ctx; | ||
} | ||
if is_dir(`${context.package_dir}/systems`) { | ||
import_run("delete_systems", instance, context); | ||
ctx = import_run("delete_systems", instance, context); | ||
if type_of(ctx) == "map" { | ||
context = ctx; | ||
} | ||
} | ||
if is_dir(`${context.package_dir}/tofu`) { | ||
context = import_run("delete_tofu", instance, context); | ||
} | ||
if is_dir(`${context.package_dir}/crds`) { | ||
import_run("delete_crds", instance, context); | ||
ctx = import_run("delete_crds", instance, context); | ||
if type_of(ctx) == "map" { | ||
context = ctx; | ||
} | ||
} | ||
import_run("delete_post", instance, context); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,25 @@ | ||
import "build_context" as build; | ||
fn run(instance, args) { | ||
let context = build::run(instance, args); | ||
import_run("context_pre", instance, context); | ||
let ctx = import_run("context_pre", instance, context); | ||
if type_of(ctx) == "map" { | ||
context = ctx; | ||
} | ||
let name = instance.get_tenant_name(); | ||
let nss = instance.get_tenant_namespaces(); | ||
context["tenant"] = #{ | ||
name: name, | ||
namespaces: nss, | ||
}; | ||
let ctx = import_run("context_tenant", instance, context); | ||
ctx = import_run("context_tenant", instance, context); | ||
if type_of(ctx) == "map" { | ||
context = ctx; | ||
} | ||
let extra = import_run("context_extra", instance, context); | ||
context["extra"] = extra; | ||
import_run("context_post", instance, context); | ||
ctx = import_run("context_post", instance, context); | ||
if type_of(ctx) == "map" { | ||
context = ctx; | ||
} | ||
context | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,28 @@ | ||
fn run(instance, context) { | ||
import_run("delete_pre", instance, context); | ||
if is_dir(`${context.package_dir}/tofu`) { | ||
context = import_run("delete_tofu", instance, context); | ||
let ctx = import_run("delete_pre", instance, context); | ||
if type_of(ctx) == "map" { | ||
context = ctx; | ||
} | ||
if is_dir(`${context.package_dir}/scalables`) { | ||
import_run("delete_scalables", instance, context); | ||
ctx = import_run("delete_scalables", instance, context); | ||
if type_of(ctx) == "map" { | ||
context = ctx; | ||
} | ||
} | ||
if is_dir(`${context.package_dir}/tofu`) { | ||
context = import_run("delete_tofu", instance, context); | ||
} | ||
if is_dir(`${context.package_dir}/others`) { | ||
import_run("delete_others", instance, context); | ||
ctx = import_run("delete_others", instance, context); | ||
if type_of(ctx) == "map" { | ||
context = ctx; | ||
} | ||
} | ||
if is_dir(`${context.package_dir}/vitals`) { | ||
import_run("delete_vitals", instance, context); | ||
ctx = import_run("delete_vitals", instance, context); | ||
if type_of(ctx) == "map" { | ||
context = ctx; | ||
} | ||
} | ||
import_run("delete_post", instance, context); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.