Yams icon indicating copy to clipboard operation
Yams copied to clipboard

How to exclude template when decode yaml with anchor

Open Whirlwind opened this issue 5 years ago • 0 comments

.ci_job_template: &ci_job_template
  only:
    - triggers
    - web

patch:
  <<: *ci_job_template
  stage: precheck_build

after YAMS.load, I get

{
  ".ci_job_template": {
    "only": ["triggers", "web"]
  },
  "patch": {
    "only": ["triggers", "web"],
    "stage": "precheck_build"
  }
}

I want to exclude the .ci_job_template. But I can not check the node whether it is a anchor.

Whirlwind avatar May 06 '20 10:05 Whirlwind