Skip to content

Commit 231255f

Browse files
committed
docs: add initial release-process.md
1 parent f178686 commit 231255f

File tree

1 file changed

+142
-0
lines changed

1 file changed

+142
-0
lines changed

docs/release-process.md

+142
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
# Ansible Release Process
2+
3+
## Preamble
4+
5+
This document describes the ansible community package release process.
6+
7+
> **Note**
8+
>
9+
> Throughout this page, placeholder values in code blocks are formatted as
10+
> `{PLACEHOLDER}` where `PLACEHOLDER` describes the value to fill in.
11+
12+
13+
## Set up repository clones
14+
15+
First, you need to set up ansible-build-data and antsibull repository clones.
16+
This only needs to be done once.
17+
18+
1. [Fork][abd-fork] the [ansible-build-data] repository.
19+
2. Checkout the antsibull and ansible-documentation repositories
20+
and change into antsibull.
21+
22+
```
23+
git clone https://github.com/ansible/ansible-documentation
24+
git clone https://github.com/ansible-community/antsibull
25+
cd antsibull
26+
```
27+
3. Checkout ansible-build-data and configure your fork.
28+
29+
To checkout the repository run
30+
31+
```
32+
mkdir build
33+
cd build
34+
git clone https://github.com/ansible-community/ansible-build-data
35+
cd ansible-build-data
36+
```
37+
38+
Then, configure your fork.
39+
This guide uses your Github username as the fork remote name.
40+
41+
```
42+
git remote add {USERNAME} https://github.com/{USERNAME}/ansible-build-data
43+
git fetch {USERNAME} -v
44+
```
45+
46+
## Release
47+
48+
1. Change into the antsibull checkout.
49+
Make sure you have the `main` branch checked out
50+
and run `git pull` to update to the latest commit.
51+
52+
2. Create a clean virtual environment for the release process.
53+
54+
```
55+
rm -rf release-venv
56+
python3 -m venv release-venv
57+
. ./release-venv/bin/activate
58+
pip install -U pip
59+
```
60+
61+
Install the `antsibull`, `ansible-core`, and `twine` python packages,
62+
as well as the community.general collection.
63+
64+
```
65+
pip install antsibull ansible-core twine
66+
ansible-galaxy collection install --force community.general
67+
```
68+
69+
3. Run the [ansible release playbook][release-playbook]
70+
with the appropriate options.
71+
You can see the [argument spec][release-playbook-args]
72+
for a full breakdown, but this describes the basic usage.
73+
74+
```
75+
export ANSIBLE_CALLBACK_RESULT_FORMAT=yaml
76+
ansible-playbook playbooks/build-single-release.yaml -e antsibull_ansible_version={VERSION}
77+
```
78+
79+
> **Note**
80+
>
81+
> When building ansible versions greater than 9.0.0a1,
82+
> `Validate tags file` task failures will fail the release playbook instead
83+
> of warning and moving on.
84+
> See [policies.md][tagging-enforcement] for how to proceed if this step fails.
85+
86+
4. Commit the changes and push them to your fork.
87+
88+
You can run the following commands to do so
89+
90+
```
91+
cd build/ansible-build-data
92+
git switch -c release-{VERSION}
93+
git add {MAJOR VERSION}/
94+
git commit -m "Ansible {VERSION}: Dependencies, changelog and porting guide"
95+
git push -u {USERNAME} release-{VERSION}
96+
```
97+
98+
Then, submit a pull request against ansible-build-data upstream.
99+
100+
5. Submit a PR to ansible/ansible-documentation to add the new porting guide to the docsite.
101+
Copy the porting guide to the ansible docsite directory
102+
in your ansible checkout with the following command
103+
104+
```
105+
cp {MAJOR VERSION}/porting_guide_{MAJOR VERSION}.rst ../ansible-documentation/docs/docsite/rst/porting_guides/
106+
```
107+
108+
switch to the ansible checkout,
109+
commit and push the changes,
110+
and then submit a PR as you normally would.
111+
You can use `Add Ansible community {VERSION} porting guide` as the commit message.
112+
113+
6. Once the ansible-build-data PR has been merged,
114+
publish the build artifacts to PyPI.
115+
From the antsibull repository root, run
116+
117+
```
118+
twine upload build/ansible-{VERSION}.tar.gz build/ansible-{VERSION}*.whl
119+
```
120+
121+
7. Tag the release commit in the ansible-build-data repository.
122+
123+
```
124+
cd build/ansible-build-data
125+
git switch main
126+
git pull
127+
git tag {VERSION} {MERGED PR COMMIT HASH} -a -m "Ansible {VERSION}: Changelog, Porting Guide and Dependent Collection Details"
128+
git push --follow-tags
129+
```
130+
131+
8. Announce the release on Matrix and the mailing list.
132+
TODO: Move announcement templates into this repository.
133+
Release managers can copy and paste the previous release's announcement for
134+
now.
135+
Make sure to change the version numbers and sha256sum in the announcement
136+
text.
137+
138+
[abd-fork]: https://github.com/ansible-community/ansible-build-data/fork
139+
[ansible-build-data]: https://github.com/ansible-community/ansible-build-data
140+
[release-playbook]: https://github.com/ansible-community/antsibull/blob/main/playbooks/build-single-release.yaml
141+
[release-playbook-args]: https://github.com/ansible-community/antsibull/blob/main/roles/build-release/meta/argument_specs.yml
142+
[tagging-enforcement]: https://github.com/gotmax23/ansible-build-data/blob/docs/docs/policies.md#enforcement

0 commit comments

Comments
 (0)