If I have a yml anchor in my drone.yml file and run a drone fmt --save
all anchor references are expanded and the anchor is removed. We’ve been using drone fmt --save
for consistency across our repositories but would like to utilize anchors to reuse some things.
Example Pipeline:
---
kind: pipeline
name: prod
deploy_app_anchor: &deploy_app_anchor
image: golang:1.15
commands:
- echo "deploying your stuff"
steps:
- name: deploy_app
<<: *deploy_app_anchor
when:
branch:
- master
event:
- push
...
After drone fmt --save
---
kind: pipeline
name: prod
steps:
- name: deploy_app
image: golang:1.15
commands:
- echo "deploying your stuff"
when:
branch:
- master
event:
- push
...