What is the canonical YAML naming style

前端 未结 2 1728
没有蜡笔的小新
没有蜡笔的小新 2021-02-04 23:16

I am designing a new YAML file, and I want to use the most standard style of naming. Which is it?

Hyphenated?

- job-name:
    ...

lowe

2条回答
  •  故里飘歌
    2021-02-04 23:46

    Kubernetes using CamelCase: https://kubernetes.io/docs/user-guide/jobs/

    apiVersion, restartPolicy

    CircleCI using snake_case: https://circleci.com/docs/1.0/configuration/

    working_directory restore_cache, store_artifacts

    Jenkins with dash-case: https://github.com/jenkinsci/yaml-project-plugin/blob/master/samples/google-cloud-storage/.jenkins.yaml

    stapler-class


    So it looks like projects and teams use their own conventions and there is no one definite standard.

提交回复
热议问题