Skip to content

Commit 3590f65

Browse files
oraNodgotmax23felixfonteinsamccann
authored
Documenting the branching process (#1956)
* resolves #1772 documenting the branching process * Update README.md Co-authored-by: Maxwell G <[email protected]> * Update README.md Co-authored-by: Felix Fontein <[email protected]> * updates and suggestions * update the support matrix section * Update README.md Co-authored-by: Maxwell G <[email protected]> * Update README.md Co-authored-by: Maxwell G <[email protected]> * updates and suggestions * maintainers guide * rm active branch example * Update MAINTAINERS.md Co-authored-by: Sandra McCann <[email protected]> --------- Co-authored-by: Maxwell G <[email protected]> Co-authored-by: Felix Fontein <[email protected]> Co-authored-by: Sandra McCann <[email protected]>
1 parent d698467 commit 3590f65

File tree

2 files changed

+83
-2
lines changed

2 files changed

+83
-2
lines changed

MAINTAINERS.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
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.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ The lock files contain tested dependencies that are automatically updated on a w
114114

115115
If you'd like to use untested dependencies, set `PINNED=false` as in the following example:
116116

117-
```
117+
```bash
118118
PINNED=false nox -s "checkers(docs-build)"
119119
```
120120

@@ -158,7 +158,7 @@ This will determine any missing `ansible-core` tags and create them in `ansible-
158158
nox -s tag
159159

160160
# If you use a different upstream remote, specify the name.
161-
nox -s tag -- --remote <name> tag
161+
nox -s tag -- --remote <name> tag
162162

163163
# If your core repo is not in the same filesystem location, specify the path.
164164
nox -s tag -- --core <path> tag

0 commit comments

Comments
 (0)