Skip to content

Input variables with spaces fail to render pipeline yaml #1628

@ms-ethomaso

Description

@ms-ethomaso

Minimal .gitlab-ci.yml illustrating the issue

spec:
  inputs:
    Run Additional Pipeline:
      description: "Trigger Another Pipeline"
      type: boolean
      default: false
---
job:
  rules:
    - if: '"$[[ inputs.Run-Additional-Pipeline ]]" == "true"'
  script:
    - echo "Heya"

**Expected behaviour **
I do not have access to a public gitlab reproducing this issue, the above renders correctly on a self-hosted gitlab instance running v18.2.0

The provided gitlab yaml should render.

Host information
MacOS: Sequioia 15.5
gitlab-ci-local 4.61.1

Containerd binary
Colima runtime

Additional context
Replacing the input variable with hyphens - fixes the issue.
This is only a bug in my eyes as it is valid gitlab-ci.yml but invalid to gitlab-ci-local.

valid template:

spec:
  inputs:
    Run Additional Pipeline:
      description: "Trigger Another Pipeline"
      type: boolean
      default: false
---
job:
  rules:
    - if: '"$[[ inputs.Run-Additional-Pipeline ]]" == "true"'
  script:
    - echo "Heya"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions