-
Optional
attributes: some_attribute: nested_attribute1: this is 1 nested_attribute2: that is 2 composed_attribute: - 1 - 2 - 3
Contains definition of data that passed into executable scripts as a single parameter.
This parameter should be of type Powershell
[hashtable]
that allows to merge, interpolate and override contained values during PWSHAKE execution.The given example is transformed in the following Powershell
[hashtable]
and passed by PWSHAKE engine to every executable script defined in thetasks:
element.@{ attributes=@{ some_attribute=@{ nested_attribute1="this is 1"; nested_attribute2="that is 2"; }; composed_attribute=@(1,2,3); } }
-
Optional
includes: - attributes.json - pwshake-ci\start-stage.yaml - pwshake-ci\stop-stage.yaml
Contains list of file paths relational to the main
pwshake.yaml
that will be merged into the main config before PWSHAKE engine starts execution. It's useful for splitting long configurations to several meaningful parts. -
Alias:
actions:
Optional
templates: cmd: text: echo do_nothing powershell: | if (${is-Windows}) { cmd /c "$($cmd.text)" *>&1 } else { bash -c "$($cmd.text)" *>&1 }
Contains named
yaml
structures that PWSHAKE engine substitutes in[step:]
elements to short steps definitions or to reuse in frequent cases. -
Aliases:
run_lists:
,roles:
Optional
tasks: clean: only: (Test-Path ./results) steps: - powershell: rm ./results -recurse -force build: - run_build_script test: - powershell: dotnet test publish: - cmd: | python.exe ./tools/some_script.py --with long ^ --list of --options that --doesnt feet ^ --to single_line
Contains definition of composed and interdependent tasks that will be performed by PWSHAKE engine by executing
steps:
which are defined astasks:
items. -
Aliases:
invoke_run_lists:
,apply_roles:
Optional
invoke_tasks: - clean - build - test - publish
Tells to PWSHAKE engine about consist and order of execution items defined in the
tasks:
element. -
Optional
scripts_directories: - tests - tools
Tells to PWSHAKE engine where to find scripts defined as items of the
tasks:
element. -
Optional
attributes_overrides: - local - test - stage - prod
Tells to PWSHAKE engine about list of
metadata
files and order of overridingattributes:
in the mainpwshake.yaml
config file before the actual execution. -
Alias:
repositories:
Optional
resources: - git: repo: https://github.com/wild-devops/pwshake.git ref: v1.0.0 directories: - examples - doc target: .old_repo
Tells to PWSHAKE engine about the source(-s) of outer resources that should be loaded before the current execution starts.
-
Optional
filters: f-$capsed: |- { "$_".ToUpper() } f-braced: |- { "[$_]" }
Tells to PWSHAKE engine to add small functions into the script execution context.
These functions will be used into the PWSHAKE processing as attributes interpolators or helpers.