Skip to content

Commit 49f44ae

Browse files
gotmax23oraNod
andauthored
Add mkdocs configuration for the release docs (#326)
Co-authored-by: Don Naro <[email protected]>
1 parent 5fcabf1 commit 49f44ae

File tree

8 files changed

+141
-81
lines changed

8 files changed

+141
-81
lines changed

.readthedocs.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
version: 2
3+
build:
4+
os: ubuntu-22.04
5+
tools:
6+
python: "3.11"
7+
commands:
8+
- pip install -U nox
9+
- mkdir -p _readthedocs/html/
10+
- nox -e mkdocs -- build --site-dir=_readthedocs/html

docs-requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
mkdocs
2+
mkdocs-ansible

docs/CONVENTIONS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
- The docs in this directory should follow the [Semantic Line Breaks][1] standard.
55
- The docs in this directory should follow the [Ansible documentation style guide][2]
66
when applicable.
7+
- The docs in this directory should use `Title Case` for page headings and
8+
`Sentence case` for subheadings.
9+
- Make sure to add new docs to the `nav:` config in `mkdocs.yml`.
710

811
[1]: https://sembr.org/
912
[2]: https://docs.ansible.com/ansible/latest/dev_guide/style_guide/basic_rules.html

docs/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../README.md

docs/policies.md

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -69,40 +69,43 @@ In case of violations, the release manager must preform the following steps:
6969
1. First, the collection must be restricted to the previous tagged release in
7070
the `ansible-VERSION.constraints` file.
7171

72-
Take the `community.docker` collection as an example. If its version 3.9.0
73-
was released and correctly tagged, and 3.9.1 was released but not correctly
74-
tagged, add
72+
Take the `community.docker` collection as an example. If its version 3.9.0
73+
was released and correctly tagged, and 3.9.1 was released but not correctly
74+
tagged, add
7575

76-
```
77-
community.docker: <3.9.1
78-
```
76+
```
77+
community.docker: <3.9.1
78+
```
7979
8080
2. Commit only the changed `ansible-VERSION.constraints` file:
8181
8282
```
8383
git add 8/ansible-8.constraints
8484
git commit -m "pin community.docker to previous release"
8585
```
86+
8687
3. Rerun the release playbook.
8788
In this example, the ansible distribution will be built with
8889
community.docker 3.9.0 even though community.docker 3.9.1 is the latest
8990
version.
91+
9092
4. Proceed with the rest of the release process as normal.
9193
Commit the other changed files.
9294
The collection release PR should be applied using the `Rebase and merge`
9395
option (as opposed to `Squash and merge`) so the first commit can be more
9496
easily reverted when/if the collection fixes the issue.
97+
9598
5. The release manager or another community member needs to file an issue in
9699
the violating collection's issue tracker.
97100
This part should not block the current ansible package release,
98101
but the issue must have been filed before the following minor release.
99102
The following issue template can be used:
100103
101-
``` markdown
102-
Hi! As part of the ansible community package release process, we've determined that version {VERSION} of {COLLECTION} was released to Ansible Galaxy but not properly tagged in this Git repository.
103-
This violates the [repository management][1] section of the Collection Requirements:
104+
``` markdown
105+
Hi! As part of the ansible community package release process, we've determined that version {VERSION} of {COLLECTION} was released to Ansible Galaxy but not properly tagged in this Git repository.
106+
This violates the [repository management][1] section of the Collection Requirements:
104107
105-
[1]: https://docs.ansible.com/ansible/devel/community/collection_contributors/collection_requirements.html#repository-management
108+
[1]: https://docs.ansible.com/ansible/devel/community/collection_contributors/collection_requirements.html#repository-management
106109
107110
> Every collection MUST have a public git repository. Releases of the collection MUST be tagged in said repository. This means that releases MUST be `git tag`ed and that the tag name MUST exactly match the Galaxy version number. Tag names MAY have a `v` prefix, but a collection's tag names MUST have a consistent format from release to release.
108111
>
@@ -112,7 +115,8 @@ In case of violations, the release manager must preform the following steps:
112115
113116
[2]: https://github.com/ansible-collections/overview/blob/main/removal_from_ansible.rst#collections-not-satisfying-the-collection-requirements
114117
115-
```
118+
```
119+
116120
6. Post a comment in <https://github.com/ansible-community/ansible-build-data/issues/223>
117121
with a link to the issue.
118122

docs/release-process.md

Lines changed: 70 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44

55
This document describes the ansible community package release process.
66

7-
> **Note**
8-
>
9-
> Throughout this page, placeholder values in code blocks are formatted as
10-
> `${PLACEHOLDER_VALUE}` where `PLACEHOLDER_VALUE` describes the value to fill in.
7+
!!! note
8+
Throughout this page, placeholder values in code blocks are formatted as
9+
`${PLACEHOLDER_VALUE}` where `PLACEHOLDER_VALUE` describes the value to fill in.
1110

1211

1312
## Set up container
@@ -29,32 +28,34 @@ First, you need to set up ansible-build-data and antsibull repository clones.
2928
This only needs to be done once.
3029

3130
1. [Fork][abd-fork] the [ansible-build-data] repository.
31+
3232
2. Checkout the antsibull and ansible-documentation repositories
3333
and change into antsibull.
3434

35-
```
36-
git clone https://github.com/ansible/ansible-documentation
37-
git clone https://github.com/ansible-community/antsibull
38-
cd antsibull
39-
```
35+
```
36+
git clone https://github.com/ansible/ansible-documentation
37+
git clone https://github.com/ansible-community/antsibull
38+
cd antsibull
39+
```
40+
4041
3. Checkout ansible-build-data and configure your fork.
4142
42-
To checkout the repository run
43+
To checkout the repository run
4344
44-
```
45-
mkdir build
46-
cd build
47-
git clone https://github.com/ansible-community/ansible-build-data
48-
cd ansible-build-data
49-
```
45+
```
46+
mkdir build
47+
cd build
48+
git clone https://github.com/ansible-community/ansible-build-data
49+
cd ansible-build-data
50+
```
5051
51-
Then, configure your fork.
52-
This guide uses your Github username as the fork remote name.
52+
Then, configure your fork.
53+
This guide uses your Github username as the fork remote name.
5354
54-
```
55-
git remote add ${USERNAME} https://github.com/${USERNAME}/ansible-build-data
56-
git fetch ${USERNAME} -v
57-
```
55+
```
56+
git remote add ${USERNAME} https://github.com/${USERNAME}/ansible-build-data
57+
git fetch ${USERNAME} -v
58+
```
5859
5960
## Perform release process
6061
@@ -64,82 +65,81 @@ This only needs to be done once.
6465
6566
2. Create a clean virtual environment for the release process.
6667
67-
```
68-
rm -rf release-venv
69-
python3 -m venv release-venv
70-
. ./release-venv/bin/activate
71-
python3 -m pip install -U pip
72-
```
68+
```
69+
rm -rf release-venv
70+
python3 -m venv release-venv
71+
. ./release-venv/bin/activate
72+
python3 -m pip install -U pip
73+
```
7374
74-
Install the `antsibull`, `ansible-core`, and `twine` python packages,
75-
as well as the community.general collection.
75+
Install the `antsibull`, `ansible-core`, and `twine` python packages,
76+
as well as the community.general collection.
7677
77-
```
78-
python3 -m pip install antsibull ansible-core twine
79-
ansible-galaxy collection install --force community.general
80-
```
78+
```
79+
python3 -m pip install antsibull ansible-core twine
80+
ansible-galaxy collection install --force community.general
81+
```
8182
8283
3. Run the [ansible release playbook][release-playbook]
8384
with the appropriate options.
8485
You can see the [argument spec][release-playbook-args]
8586
for a full breakdown, but this describes the basic usage.
8687
87-
```
88-
export ANSIBLE_CALLBACK_RESULT_FORMAT=yaml
89-
ansible-playbook playbooks/build-single-release.yaml -e antsibull_ansible_version=${VERSION}
90-
```
88+
```
89+
export ANSIBLE_CALLBACK_RESULT_FORMAT=yaml
90+
ansible-playbook playbooks/build-single-release.yaml -e antsibull_ansible_version=${VERSION}
91+
```
9192
92-
> **Note**
93-
>
94-
> When building ansible versions greater than 9.0.0a1,
95-
> `Validate tags file` task failures will fail the release playbook instead
96-
> of warning and moving on.
97-
> See [policies.md][tagging-enforcement] for how to proceed if this step fails.
93+
!!! note
94+
When building ansible versions greater than 9.0.0a1,
95+
`Validate tags file` task failures will fail the release playbook instead
96+
of warning and moving on.
97+
See [policies.md][tagging-enforcement] for how to proceed if this step fails.
9898
9999
4. Commit the changes and push them to your fork.
100100
101-
You can run the following commands to do so
101+
You can run the following commands to do so
102102
103-
```
104-
cd build/ansible-build-data
105-
git switch -c release-${VERSION}
106-
git add ${MAJOR_VERSION}/
107-
git commit -m "Ansible ${VERSION}: Dependencies, changelog and porting guide"
108-
git push -u ${USERNAME} release-${VERSION}
109-
```
103+
```
104+
cd build/ansible-build-data
105+
git switch -c release-${VERSION}
106+
git add ${MAJOR_VERSION}/
107+
git commit -m "Ansible ${VERSION}: Dependencies, changelog and porting guide"
108+
git push -u ${USERNAME} release-${VERSION}
109+
```
110110
111-
Then, submit a pull request against ansible-build-data upstream.
111+
Then, submit a pull request against ansible-build-data upstream.
112112
113113
5. Submit a PR to ansible/ansible-documentation to add the new porting guide to the docsite.
114114
Copy the porting guide to the ansible docsite directory
115115
in your ansible checkout with the following command
116116
117-
```
118-
cp ${MAJOR_VERSION}/porting_guide_${MAJOR_VERSION}.rst ../ansible-documentation/docs/docsite/rst/porting_guides/
119-
```
117+
```
118+
cp ${MAJOR_VERSION}/porting_guide_${MAJOR_VERSION}.rst ../ansible-documentation/docs/docsite/rst/porting_guides/
119+
```
120120
121-
switch to the ansible checkout,
122-
commit and push the changes,
123-
and then submit a PR as you normally would.
124-
You can use `Add Ansible community ${VERSION} porting guide` as the commit message.
121+
switch to the ansible checkout,
122+
commit and push the changes,
123+
and then submit a PR as you normally would.
124+
You can use `Add Ansible community ${VERSION} porting guide` as the commit message.
125125
126126
6. Once the ansible-build-data PR has been merged,
127127
publish the build artifacts to PyPI.
128128
From the antsibull repository root, run
129129
130-
```
131-
twine upload build/ansible-${VERSION}.tar.gz build/ansible-${VERSION}*.whl
132-
```
130+
```
131+
twine upload build/ansible-${VERSION}.tar.gz build/ansible-${VERSION}*.whl
132+
```
133133
134134
7. Tag the release commit in the ansible-build-data repository.
135135
136-
```
137-
cd build/ansible-build-data
138-
git switch main
139-
git pull
140-
git tag ${VERSION} ${MERGED_PR_COMMIT_HASH} -a -m "Ansible ${VERSION}: Changelog, Porting Guide and Dependent Collection Details"
141-
git push --follow-tags
142-
```
136+
```
137+
cd build/ansible-build-data
138+
git switch main
139+
git pull
140+
git tag ${VERSION} ${MERGED_PR_COMMIT_HASH} -a -m "Ansible ${VERSION}: Changelog, Porting Guide and Dependent Collection Details"
141+
git push --follow-tags
142+
```
143143
144144
8. Announce the release on Matrix and the mailing list.
145145
TODO: Move announcement templates into this repository.

mkdocs.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
site_name: Ansible Package Release Management
3+
site_url: https://ansible.readthedocs.io/projects/ansible-build-data
4+
repo_url: https://github.com/ansible-community/ansible-build-data
5+
theme:
6+
name: ansible
7+
features:
8+
- content.code.copy
9+
- navigation.footer
10+
# NOTE(gotmax23): I dislike web fonts in general and the Red Hat fonts from
11+
# the Ansible theme in particular
12+
font: false
13+
# REUSE-IgnoreStart
14+
copyright: >
15+
Copyright (C) 2023 Ansible Project Authors |
16+
SPDX-License-Identifier: <a style="text-decoration: underline;" href="https://github.com/ansible/ansible/blob/devel/COPYING">GPL-3.0-only</a>
17+
# REUSE-IgnoreEnd
18+
markdown_extensions:
19+
# Builtin
20+
- admonition
21+
- toc:
22+
permalink: true
23+
# pymdownx
24+
- pymdownx.highlight:
25+
anchor_linenums: true
26+
- pymdownx.superfences
27+
nav:
28+
- Ansible Build Data: README.md
29+
- release-process.md
30+
- policies.md
31+
- new-ansible-and-freezes.md

noxfile.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
from __future__ import annotations
2+
3+
import nox
4+
5+
6+
@nox.session
7+
def mkdocs(session: nox.Session):
8+
session.install("-r", "docs-requirements.txt")
9+
session.run("mkdocs", *(session.posargs or ["build"]))

0 commit comments

Comments
 (0)