Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

What are Pipeline Variables?

Each automation pipeline can have optional variables defined. A pipeline variable an be declared at the very beginning of a pipeline in the vars: section and then used inside the automation pipeline using the Pipeline Expression Language (PEL) and the vars scope. Here is an example:

vars:
  firstName: "Petra"
pipeline:
  - body.set: "My first name is: ${vars.firstName}"

Which produces an output like this:

My first name is: Petra

As you can see, the variable can be read using the PEL by defining the vars scope and its name separated by a dot:

${vars.firstName}

Note: It is good practise to declare every variable in the vars: section at the very top so it is more clear which variables are in use inside the automation pipeline.

  • No labels