Skip to content

Latest commit

 

History

History
32 lines (26 loc) · 1.08 KB

script.adoc

File metadata and controls

32 lines (26 loc) · 1.08 KB

script

The script command will invoke another script using the same ssh terminal as the current script. The simple YAML syntax just accepts the target script name but the YAML mapping syntax can also include an async option. Setting async: true will create a new ssh terminal and

- script: create_unique_name
- script:
    name: setup_runtime
    async: true

Using async will start the script in an independent ssh terminal. The next sibling will run while the script is running and any then from the script will run as part of the new ssh terminal. Because async uses a separate ssh terminal it will create a copy of the current script’s state and will no modify the same state. Environment changes in the script and its then will not be shared with the subsequent commands in the original script.

overriding script state

It is possible to pass state variables when invoking a script to override the default state variables used by the script.

- script: create_unique_name
- script: setup_runtime
  with:
    msg: hello!