Pipeline Variables

What are Pipeline Variables?

Each automation pipeline can have optional variables defined. A pipeline variable can 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 of your automation pipeline so it is more clear which variables are in use inside the automation pipeline.

Â