|
| 1 | +# Maintainers guide |
| 2 | + |
| 3 | +Find details about maintaining the `ansible-documentation` repository. |
| 4 | +Note that maintainers have privileged access to the repository to perform special functions such as branching for new versions and preparing Ansible documentation for publishing. |
| 5 | +If you're interested in becoming a maintainer, or want to get in touch with us, please join us on matrix at [#docs:ansible.im](https://matrix.to/#/#docs:ansible.im). |
| 6 | +We have weekly meetings on matrix every Tuesday (see [the Ansible calendar](https://forum.ansible.com/upcoming-events)) and welcome additions to our [weekly agenda items](https://forum.ansible.com/t/documentation-working-group-agenda/153). |
| 7 | + |
| 8 | +## Branching for new stable versions |
| 9 | + |
| 10 | +The branching strategy for this repository mirrors the [`ansible/ansible`](https://github.com/ansible/ansible) repository. |
| 11 | +When a new `stable-*` branch is created in the core repository, a corresponding branch in the `ansible-documentation` repository needs to be created. |
| 12 | +There are various other changes that should occur around the same time that the new stable branch is cut. |
| 13 | + |
| 14 | +### Creating stable branches |
| 15 | + |
| 16 | +Create new stable branches as follows: |
| 17 | + |
| 18 | +```bash |
| 19 | +# Make sure your checkout is up to date. |
| 20 | +git fetch upstream |
| 21 | + |
| 22 | +# Create a new stable branch against the devel branch. |
| 23 | +git checkout -b stable-2.18 upstream/devel |
| 24 | + |
| 25 | +# Push the new stable branch to the repository. |
| 26 | +git push upstream stable-2.18 |
| 27 | +``` |
| 28 | + |
| 29 | +After the new stable branch is created, the following changes should be committed as pull requests to the new stable branch: |
| 30 | + |
| 31 | +* Update the core branch in the `docs/ansible-core-branch.txt` file. |
| 32 | +* Remove devel-only tooling. |
| 33 | +* Update Python versions in the support matrix. |
| 34 | + |
| 35 | +### Updating the core branch |
| 36 | + |
| 37 | +The script that grafts portions of the core repository uses the `docs/ansible-core-branch.txt` file to specify which branch to clone. |
| 38 | +When a new stable branch is created, modify the file so that it specifies the correct version. |
| 39 | + |
| 40 | +```bash |
| 41 | +sed -i 's/devel/stable-2.18/g' docs/ansible-core-branch.txt |
| 42 | +``` |
| 43 | + |
| 44 | +### Removing devel-only tooling |
| 45 | + |
| 46 | +There are some scripts and other tooling artefacts that should be on the `devel` branch only. |
| 47 | +After creating a new stable branch, remove the appropriate files and references. |
| 48 | + |
| 49 | +```bash |
| 50 | +# Remove the following workflow files, the tagger script, and tagger requirements. |
| 51 | +git rm -r .github/workflows/pip-compile-dev.yml .github/workflows/pip-compile-docs.yml .github/workflows/reusable-pip-compile.yml .github/workflows/tag.yml hacking/tagger tests/tag.* |
| 52 | +``` |
| 53 | + |
| 54 | +Next, remove references to the tagger dependencies as follows: |
| 55 | + |
| 56 | +1. Remove the reference from the typing input file. |
| 57 | + |
| 58 | + ```bash |
| 59 | + sed -i '/-r tag.in/d' tests/typing.in |
| 60 | + ``` |
| 61 | + |
| 62 | +2. Clean up the typing lockfile. |
| 63 | + |
| 64 | + ```bash |
| 65 | + nox -s pip-compile -- --no-upgrade |
| 66 | + ``` |
| 67 | + |
| 68 | +3. Open `noxfile.py` and remove `"hacking/tagger/tag.py",` from the `LINT_FILES` tuple. |
| 69 | + |
| 70 | +### Update Python versions in the support matrix |
| 71 | + |
| 72 | +The minimum supported Python version changes with each Ansible core version. |
| 73 | +This requires an update to the support matrix documentation after a new stable branch is created to reflect the appropriate Control Node Python versions. |
| 74 | + |
| 75 | +Uncomment the new stable version from the `ansible-core support matrix` section in the `docs/docsite/rst/reference_appendices/release_and_maintenance.rst` file. |
| 76 | +Submit a PR with the changes and request a core team review. |
| 77 | + |
| 78 | +### Updating the tagger script |
| 79 | + |
| 80 | +Update the list of active branches in the `hacking/tagger/tag.py` script on the `devel` branch. |
| 81 | +Add the new stable branch and remove the lowest version from the `DEFAULT_ACTIVE_BRANCHES` tuple. |
0 commit comments