Skip to content

config validate does not recognize pipeline.event.name pipeline value #1094

Closed
@Holi0317

Description

@Holi0317

Meta:

CircleCI CLI Version:

0.1.31425+ebcbd1f (release)

Operating System:

Arch Linux, under WSL2

CircleCI CLI Diagnostic:

---
CircleCI CLI Diagnostics
---
Debugger mode: false
Config found: /home/hollis.wu/.circleci/cli.yml
API host: https://circleci.com
API endpoint: graphql-unstable
Error: please set a token with 'circleci setup'
You can create a new personal API token here:
https://circleci.com/account/api

Current behavior:

version: 2.1

commands:
  run-me:
    steps:
      - my-step:
          command: |
            echo 1

workflows:
  build-1:
    when: |
      pipeline.event.name == "pull_request"
    jobs:
      - run-me

Run circleci config validate, here is the reported error

Error: config compilation contains errors: config compilation contains errors:
        - Error calling workflow: 'build-1'
        - Error evaluating workflow filter expression:
        - Referred to a variable "pipeline.event.name" that does not exist:
        - pipeline.event.name == "pull_request"
        - ^^^^^^^^^^^^^^^^^^^

Expected behavior:

The config should pass validation

When did this begin / Was this previously working?:

IDK just started to use pipeline.event.name pipeline variable

Additional Information:

This variable is documented in https://circleci.com/docs/github-trigger-event-options/#supported-trigger-options, but not in pipeline value table.

CircleCI dashboard didn't error out this variable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions