Skip to content

Boolean manifest variables don't interpret the same in pipeline vs vars file #64

Description

@renbeynolds

When using manifest variable substitution, booleans in the pipeline.yml are interpreted differently than when passed via a vars_file. In one case, booleans must be quote wrapped and in the other they must not be.

Example When Set In Pipeline
Broken config:

  - put: development
    params:
      path: snapshot/*.war
      manifest: src-dev/cf/manifest.yml
      vars:
        random_route: true

Corresponding error:

Incorrect Usage: invalid argument for flag `--var' (expected []template.VarKV): Deserializing variables 'random_route=%!s(bool=true)': yaml: could not find expected directive name

Working config:

  - put: development
    params:
      path: snapshot/*.war
      manifest: src-dev/cf/manifest.yml
      vars:
        random_route: 'true'

Example When Set In Vars File
Config:

  - put: development
    params:
      path: snapshot/*.war
      manifest: src-dev/cf/manifest.yml
      vars_files:
      - /tmp/build/put/src-dev/cf/devstar.yml

Broken devstar.yml:

random_route: 'true'

Corresponding error:

yaml: unmarshal errors:
  line 7: cannot unmarshal !!str `true` into bool

Working devstar.yml:

random_route: true

Concourse Deployment
Version: 4.2.1
IaaS: AWS GovCloud
Deployment: BOSH

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions