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

« Previous Version 3 Current »

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.

  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.