Add Ansible code formatting documentation
This patch addresses reviewers need to point to a standart to follow for Ansible code formatting when contributing to the Airship project. It is expected that when code is submitted, it should have ansible-lint run against it before hand. Later these should be enforced at the gate. Change-Id: I67fdfa118a1cdecf8a5bc5224687366a18d60ee5
This commit is contained in:
parent
bc6b004dba
commit
0eec89a980
@ -33,7 +33,7 @@ contain subdirectories for each of the charts maintained as part of that
|
|||||||
project. These subdirectories should be named for the component represented by
|
project. These subdirectories should be named for the component represented by
|
||||||
that chart.
|
that chart.
|
||||||
|
|
||||||
e.g.: For project ``foo``, which also maintains the charts for ``bar`` and
|
E.g.: For project ``foo``, which also maintains the charts for ``bar`` and
|
||||||
``baz``:
|
``baz``:
|
||||||
|
|
||||||
- foo/charts/foo contains the chart for ``foo``
|
- foo/charts/foo contains the chart for ``foo``
|
||||||
@ -51,7 +51,7 @@ will contain subdirectories for each of the images created as part of that
|
|||||||
project. The subdirectory will contain the dockerfile that can be used to
|
project. The subdirectory will contain the dockerfile that can be used to
|
||||||
generate the image.
|
generate the image.
|
||||||
|
|
||||||
e.g.: For project ``foo``, which also produces a Docker image for ``bar``:
|
E.g.: For project ``foo``, which also produces a Docker image for ``bar``:
|
||||||
|
|
||||||
- foo/images/foo contains the dockerfile for ``foo``
|
- foo/images/foo contains the dockerfile for ``foo``
|
||||||
- foo/images/bar contains the dockerfile for ``bar``
|
- foo/images/bar contains the dockerfile for ``bar``
|
||||||
@ -107,10 +107,17 @@ Known Standards
|
|||||||
-------------------------------------------------------
|
-------------------------------------------------------
|
||||||
Language Tools Used
|
Language Tools Used
|
||||||
=============== ======================================
|
=============== ======================================
|
||||||
|
Ansible ansible-lint
|
||||||
Go gofmt
|
Go gofmt
|
||||||
Python YAPF, Flake8
|
Python YAPF, Flake8
|
||||||
=============== ======================================
|
=============== ======================================
|
||||||
|
|
||||||
|
Ansible formatting
|
||||||
|
~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Ansible code should be linted to be conformant to the standards checked
|
||||||
|
by `ansible-lint`_ project.
|
||||||
|
|
||||||
Go Formatting
|
Go Formatting
|
||||||
~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
@ -155,8 +162,8 @@ flake8-import-order::
|
|||||||
|
|
||||||
|
|
||||||
Airship components must provide for automated checking of their formatting
|
Airship components must provide for automated checking of their formatting
|
||||||
standards, such as the lint step noted above in the makefile. Components may
|
standards, such as the lint step noted above in the Makefile, and in the future
|
||||||
provide automated reformatting.
|
via CI jobs. Components may provide automated reformatting.
|
||||||
|
|
||||||
YAML Schema
|
YAML Schema
|
||||||
~~~~~~~~~~~
|
~~~~~~~~~~~
|
||||||
@ -271,3 +278,4 @@ prevail.
|
|||||||
.. _Docker: https://www.docker.com/
|
.. _Docker: https://www.docker.com/
|
||||||
.. _helm-toolkit: https://git.openstack.org/cgit/openstack/openstack-helm-infra/tree/helm-toolkit
|
.. _helm-toolkit: https://git.openstack.org/cgit/openstack/openstack-helm-infra/tree/helm-toolkit
|
||||||
.. _Openstack-Helm: https://wiki.openstack.org/wiki/Openstack-helm
|
.. _Openstack-Helm: https://wiki.openstack.org/wiki/Openstack-helm
|
||||||
|
.. _ansible-lint: https://github.com/ansible/ansible-lint
|
||||||
|
Loading…
x
Reference in New Issue
Block a user