贡献者指南¶
要为ansible-dev-tools
Python 包或其工具列表做出贡献,请使用您自己 fork 的分支上的拉取请求。
在GitHub 上创建您的 fork 后,您可以执行以下操作
$ git clone --recursive git@github.com:your-name/developer-tool-name
$ cd developer-tool-name
$ git checkout -b your-branch-name
# DO SOME CODING HERE
$ git add your new files
$ git commit -v
$ git push origin your-branch-name
然后,您就可以从您的提交创建拉取请求。
先决条件
-
所有针对核心功能的修复(即文档或示例以外的任何内容)都应附带测试,这些测试在您更改之前失败,之后成功。
-
发送 PR 之前,请确保
tox -e lint
通过。
如果您觉得无法贡献代码修复,请随时在仓库中提出问题。
容器测试¶
pytest
已扩展以方便测试容器。
Custom options:
--container-engine=CONTAINER_ENGINE
Container engine to use. (default=ADT_CONTAINER_ENGINE, podman, docker, '')
--container-name=CONTAINER_NAME
Container name to use for the running container. (default=ADT_CONTAINER_NAME)
--image-name=IMAGE_NAME
Container name to use. (default=ADT_IMAGE_NAME)
--only-container Only run container tests
--include-container Include container tests
可以使用以下任一命令运行容器测试
# Run the tests against the default container engine
pytest --only-container
pytest --only-container --container-engine=<ce> --image-name <image>
tox -e test-image
tox -e test-image -- --container-engine=<ce> --image-name <image>
请参阅tests/integration/test_container.py
以了解示例。
Devspaces 容器的手动测试¶
目前,CI 不会测试 devspaces 容器,因此在合并任何更改之前手动测试它非常重要。
- 获取从您的拉取请求生成的临时容器的校验和,这些容器已推送到https://github.com/ansible/ansible-dev-tools/pkgs/container/ansible-devspaces-tmp
- 打开一个已创建的
- https://console.redhat.com/openshift/sandbox
联系我们¶
-
加入 Ansible 论坛
-
获取帮助:获取帮助或帮助他人。如果您启动新的讨论,请添加适当的标签,例如
devtools
标签。 - 带有“devtools”标签的帖子:订阅以参与项目相关的对话。
- 社交空间:聚集并与其他爱好者互动。
- 新闻和公告:跟踪项目范围内的公告,包括社交活动。
-
Bullhorn 新闻通讯:用于发布版本和重要更改。
-
我们还在 Matrix 的#devtools:ansible.com 房间提供支持。
可能的安全性漏洞应通过电子邮件报告给security@ansible.com。
有关通信的更多信息,请参阅Ansible 通信指南。
行为准则¶
请参阅官方的Ansible 社区行为准则。