Skip to content

check-azure-pipelines: doesn't handle default value for boolean parameter properly #403

@karunpoudel-chr

Description

@karunpoudel-chr

Following azure-pipelines.yml although valid gives pre-commit error:

parameters:
  - name: myBoolean
    displayName: myboolean
    type: boolean
    default: true

steps:
  - bash: echo "{{ parameters.myBoolean}}"

gives error:
$.parameters[0].default: True is not of type 'string'

Following works (in both pre-commit and azure pipeline) but doesn't look correct to have 'true' for boolean

parameters:
  - name: myBoolean
    displayName: myboolean
    type: boolean
    default: 'true'

steps:
  - bash: echo "{{ parameters.myBoolean}}"

Setup:

  - repo: https://github.com/python-jsonschema/check-jsonschema
    rev: 0.28.0
    hooks:
      - id: check-azure-pipelines

Metadata

Metadata

Assignees

No one assigned

    Labels

    azure-schema-liesThe Azure Pipelines Schema is at it again

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions