Pipeline Variables not valid in Orbs?

I’m trying to use the following in an orb command

  - when:
        equal: [ master, << pipeline.git.branch >> ]

However when I try to validate it I’m getting

Error: Error calling command: 'command-name'
Unknown variable(s): branch

Are pipeline variables not valid in orbs ?

Pipeline variables are not in scope in orbs - https://circleci.com/docs/2.0/pipeline-variables/#the-scope-of-pipeline-parameters

You can declare parameters to the orb and pass the values in that way.


1 Like

Does the same scope restriction apply to orbs that embed steps from consumers?

For example, I have an orb that takes a number of steps and wraps them with custom commands. It appears that consumers are unable to use pipeline parameters in the steps passed to the orb (even though the pipeline parameters are used in the steps defined in the main config file).