feat: Add support for NuShell scripts

This commit is contained in:
Gerald Pinder 2024-12-24 13:23:54 -05:00
parent 1889bd9984
commit 74bd05643f
13 changed files with 115 additions and 16 deletions

View file

@ -0,0 +1,10 @@
#!/usr/libexec/bluebuild/nu/nu
def main [$arg] {
# Parse the JSON string into a NuShell table
let parsed_json = ($arg | from json)
# List all top-level properties and their values
print "Top-level properties and values:"
$parsed_json | items {|key, value| $"Property: ($key), Value: ($value)" }
}

View file

@ -34,6 +34,14 @@ modules:
- type: test-module
source: local
- type: test-nu-modules
source: local
test-prop:
- this
- is
- a
- test
- type: containerfile
containerfiles:
- labels

View file

@ -20,7 +20,8 @@ stages:
modules:
- type: files
files:
- usr: /usr
- source: usr
destination: /usr
- type: script
scripts:
- example.sh
@ -33,3 +34,10 @@ modules:
- labels
snippets:
- RUN echo "This is a snippet"
- type: test-nu-modules
source: local
test-prop:
- this
- is
- a
- test