2017-08-18 00:25:56 +08:00
|
|
|
Contribution Guidelines
|
|
|
|
=======================
|
|
|
|
|
2018-08-08 00:07:33 +08:00
|
|
|
The repository centralises all the Ansible roles. The roles are all part of the Ansible Galaxy.
|
|
|
|
|
2017-08-18 00:25:56 +08:00
|
|
|
We love contribution and we love giving visibility to our contributors, this is why all the **commits must be signed-off**.
|
|
|
|
|
|
|
|
Mailing list
|
|
|
|
------------
|
2018-08-07 16:56:59 +08:00
|
|
|
|
|
|
|
Please register the mailing list at http://lists.ceph.com/listinfo.cgi/ceph-ansible-ceph.com.
|
2017-08-18 00:25:56 +08:00
|
|
|
|
|
|
|
IRC
|
|
|
|
---
|
2018-08-07 16:56:59 +08:00
|
|
|
|
2018-08-08 00:07:33 +08:00
|
|
|
Feel free to join us in the channel ``#ceph-ansible`` of the OFTC servers (https://www.oftc.net).
|
2017-08-18 00:25:56 +08:00
|
|
|
|
2018-07-04 16:42:34 +08:00
|
|
|
GitHub
|
2017-08-18 00:25:56 +08:00
|
|
|
------
|
2018-08-07 16:56:59 +08:00
|
|
|
|
|
|
|
The main GitHub account for the project is at https://github.com/ceph/ceph-ansible/.
|
2017-08-18 00:25:56 +08:00
|
|
|
|
|
|
|
Submit a patch
|
|
|
|
--------------
|
|
|
|
|
2018-08-07 16:56:59 +08:00
|
|
|
To start contributing just do:
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
$ git checkout -b my-working-branch
|
|
|
|
$ # do your changes #
|
|
|
|
$ git add -p
|
2017-08-18 00:25:56 +08:00
|
|
|
|
2018-08-07 16:56:59 +08:00
|
|
|
If your change impacts a variable file in a role such as ``roles/ceph-common/defaults/main.yml``, you need to generate a ``group_vars`` file:
|
2017-08-18 00:25:56 +08:00
|
|
|
|
2018-08-07 16:56:59 +08:00
|
|
|
.. code-block:: console
|
2017-08-18 00:25:56 +08:00
|
|
|
|
2018-08-07 16:56:59 +08:00
|
|
|
$ ./generate_group_vars_sample.sh
|
2017-08-18 00:25:56 +08:00
|
|
|
|
2018-08-07 16:56:59 +08:00
|
|
|
You are finally ready to push your changes on GitHub:
|
2017-08-18 00:25:56 +08:00
|
|
|
|
2018-08-07 16:56:59 +08:00
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
$ git commit -s
|
|
|
|
$ git push origin my-working-branch
|
2017-08-18 00:25:56 +08:00
|
|
|
|
|
|
|
Worked on a change and you don't want to resend a commit for a syntax fix?
|
|
|
|
|
2018-08-07 16:56:59 +08:00
|
|
|
.. code-block:: console
|
2017-08-18 00:25:56 +08:00
|
|
|
|
2018-08-07 16:56:59 +08:00
|
|
|
$ # do your syntax change #
|
|
|
|
$ git commit --amend
|
|
|
|
$ git push -f origin my-working-branch
|
2017-08-18 00:25:56 +08:00
|
|
|
|
2018-08-08 00:07:33 +08:00
|
|
|
Pull Request Testing
|
|
|
|
--------------------
|
|
|
|
|
|
|
|
Pull request testing is handled by Jenkins. All test must pass before your pull request will be merged.
|
2017-08-18 00:25:56 +08:00
|
|
|
|
2018-07-04 16:42:34 +08:00
|
|
|
All of tests that are running are listed in the GitHub UI and will list their current status.
|
2017-08-18 00:25:56 +08:00
|
|
|
|
2018-08-08 00:07:33 +08:00
|
|
|
If a test fails and you'd like to rerun it, comment on your pull request in the following format:
|
2018-08-07 16:56:59 +08:00
|
|
|
|
|
|
|
.. code-block:: none
|
2017-08-18 00:25:56 +08:00
|
|
|
|
2018-08-07 16:56:59 +08:00
|
|
|
jenkins test $scenario_name
|
2017-08-18 00:25:56 +08:00
|
|
|
|
2018-08-07 16:56:59 +08:00
|
|
|
For example:
|
2017-08-18 00:25:56 +08:00
|
|
|
|
2018-08-07 16:56:59 +08:00
|
|
|
.. code-block:: none
|
|
|
|
|
|
|
|
jenkins test luminous-ansible2.3-journal_collocation
|
2017-08-18 00:25:56 +08:00
|
|
|
|
|
|
|
Backporting changes
|
|
|
|
-------------------
|
|
|
|
|
|
|
|
If a change should be backported to a ``stable-*`` Git branch:
|
|
|
|
|
2018-08-08 00:07:33 +08:00
|
|
|
- Mark your pull request with the GitHub label "Backport" so we don't lose track of it.
|
2017-08-18 00:25:56 +08:00
|
|
|
- Fetch the latest updates into your clone: ``git fetch``
|
|
|
|
- Determine the latest available stable branch:
|
|
|
|
``git branch -r --list "origin/stable-[0-9].[0-9]" | sort -r | sed 1q``
|
2018-08-08 00:07:33 +08:00
|
|
|
- Create a new local branch for your pull request, based on the stable branch:
|
2017-10-30 22:49:51 +08:00
|
|
|
``git checkout --no-track -b my-backported-change origin/stable-3.0``
|
2017-08-18 00:25:56 +08:00
|
|
|
- Cherry-pick your change: ``git cherry-pick -x (your-sha1)``
|
2021-03-11 00:53:45 +08:00
|
|
|
- Create a new pull request against the ``stable-4.0`` branch.
|
|
|
|
- Ensure that your pull request's title has the prefix "backport:", so it's clear
|
2017-08-18 00:25:56 +08:00
|
|
|
to reviewers what this is about.
|
2018-08-08 00:07:33 +08:00
|
|
|
- Add a comment in your backport pull request linking to the original (master) pull request.
|
2017-08-18 00:25:56 +08:00
|
|
|
|
|
|
|
All changes to the stable branches should land in master first, so we avoid
|
|
|
|
regressions.
|
|
|
|
|
|
|
|
Once this is done, one of the project maintainers will tag the tip of the
|
2018-08-07 16:56:59 +08:00
|
|
|
stable branch with your change. For example:
|
|
|
|
|
|
|
|
.. code-block:: console
|
2017-08-18 00:25:56 +08:00
|
|
|
|
2018-08-07 16:56:59 +08:00
|
|
|
$ git checkout stable-3.0
|
|
|
|
$ git pull --ff-only
|
|
|
|
$ git tag v3.0.12
|
|
|
|
$ git push origin v3.0.12
|