cloudfoundry-community / cf-resource

Concourse resource for interacting with Cloud Foundry
Apache License 2.0
35 stars 63 forks source link

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

Open renbeynolds opened 5 years ago

renbeynolds commented 5 years ago

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