gocd-yaml-config-plugin icon indicating copy to clipboard operation
gocd-yaml-config-plugin copied to clipboard

runtime error when using yaml anchor <<:

Open vaibhavparnalia opened this issue 7 years ago • 3 comments
trafficstars

image runtime; - Unexpected error when handling plugin response java.lang.NullPointerException

image

deploy-dev: &deploy_pipeline group: aws materials: &deploy_pipeline_materials git-a: *baybridge git-bb: *baybridge-apps create-ami: pipeline: initialize stage: xxx deploy-qa: group: aws materials: <<: *deploy_pipeline_materials deploy-dev: pipeline: deploy-dev stage: xxx

vaibhavparnalia avatar Feb 06 '18 22:02 vaibhavparnalia

I got pretty much the same problem condensed on a slightly smaller config. any updates?

common:
  default_environment: &default_environment
    ANSIBLE_ACDC_TOMCAT_PROTOCOL: https
pipelines:
  myPipeline:
    environment_variables:
      <<: *default_environment
      ANSIBLE_TOMCAT_PORT: 10443

The error reads Failed to parse pipeline myPipeline; java.util.HashMap cannot be cast to java.lang.String

shrykull avatar Apr 26 '18 15:04 shrykull

Failed to parse pipeline myPipeline; java.util.HashMap cannot be cast to java.lang.String

I'm also struggling with this. Are we just using the tooling wrong or is this currently unsupported? Would need to define 10 lookups instead of 1 per pipeline.

benedikt-haug avatar May 24 '18 13:05 benedikt-haug

No merge syntax is not supported due to limitations of the parser. As suggested in https://github.com/tomzo/gocd-yaml-config-plugin/issues/72 replacing parser should fix this.

tomzo avatar May 24 '18 13:05 tomzo