Skip to content

Commit d55fb82

Browse files
authored
Document (re-)deprecation, cancelling deprecation, and re-adding collections; improve new major release docs; remove superfluous freeze docs (#502)
* Document (re-)deprecation, cancelling deprecation, and re-adding collections. * Remove manual freeze instructions. Use the automated build process instead, which handles this already. * Update instructions for new major releases. * Remove removal block from example. * Add missing word.
1 parent 1d46678 commit d55fb82

File tree

5 files changed

+428
-168
lines changed

5 files changed

+428
-168
lines changed

docs/automated-process.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,4 +155,4 @@ next to the release version:
155155

156156
When the new major release has been done, remember to prepare the directory for
157157
the next major Ansible release. How to do this is described in [Setting up for a
158-
new major release](new-ansible-and-freezes.md#setting-up-for-a-new-major-release).
158+
new major release](new-ansible.md#setting-up-for-a-new-major-release).

docs/new-ansible-and-freezes.md

-165
This file was deleted.

docs/new-ansible.md

+116
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
# New Ansible Releases
2+
3+
## Preamble
4+
5+
Releasing new Ansible major versions and frozen releases requires some special
6+
handling.
7+
For information about the general release process,
8+
see [Ansible Release Process](release-process.md).
9+
10+
## Setting up for a new major release
11+
12+
<!-- TODO: Write a script, playbook, or antsibull-build subcommand to automate this -->
13+
14+
After the release of `X.0.0`, it is necessary to create the directory
15+
structure for Ansible `X+1`.
16+
17+
1. Determine the current major version and next major version:
18+
19+
``` sh
20+
CURRENT_MAJOR_VERSION=11
21+
NEXT_MAJOR_VERSION=12
22+
```
23+
24+
2. Create the major version directory:
25+
26+
``` sh
27+
mkdir "${NEXT_MAJOR_VERSION}/"
28+
```
29+
30+
3. Copy over the `ansible.in` and `collection-meta.yaml` files:
31+
32+
``` sh
33+
cp "${CURRENT_MAJOR_VERSION}/ansible.in" "${CURRENT_MAJOR_VERSION}/collection-meta.yaml" \
34+
"${NEXT_MAJOR_VERSION}/"
35+
```
36+
37+
4. Symlink `${CURRENT_MAJOR_VERSION}.0.0`'s deps file to
38+
`${NEXT_MAJOR_VERSION}/ancestor.deps`:
39+
40+
``` sh
41+
ln -sr "${CURRENT_MAJOR_VERSION}/ansible-${CURRENT_MAJOR_VERSION}.0.0.deps" \
42+
"${NEXT_MAJOR_VERSION}/ancestor.deps"
43+
```
44+
45+
5. Create a stub `changelog.yaml` file:
46+
47+
``` sh
48+
cat <<EOF >${NEXT_MAJOR_VERSION}/changelog.yaml
49+
---
50+
ancestor: ${CURRENT_MAJOR_VERSION}.0.0
51+
releases: {}
52+
EOF
53+
```
54+
55+
6. Create a blank `validate-tags-ignores` file:
56+
57+
``` sh
58+
touch "${NEXT_MAJOR_VERSION}/validate-tags-ignores"
59+
```
60+
61+
7. Create a blank `ansible-${NEXT_MAJOR_VERSION}.constraints` file:
62+
63+
``` sh
64+
touch "${NEXT_MAJOR_VERSION}/ansible-${NEXT_MAJOR_VERSION}.constraints"
65+
```
66+
67+
You might need to fill this with some initial data.
68+
69+
8. Add the next major version to ansible-build-data's CI:
70+
71+
Open `.github/workflows/antsibull-build.yml` and add the following block to the
72+
matrix:
73+
74+
``` yaml
75+
- name: Ansible ${NEXT_MAJOR_VERSION}
76+
ansible_version: ${NEXT_MAJOR_VERSION}.99.0
77+
ansible_major_version: ${NEXT_MAJOR_VERSION}
78+
```
79+
80+
9. Update `collection-meta.yaml` and `ansible.in`:
81+
82+
1. Find all collection entries from `collections` in `collections-meta.yaml`
83+
that have a `removal` entry with `major_version` equal to `${NEXT_MAJOR_VERSION}`.
84+
85+
- If the `removal` entry has an `updates` and the last entry is about keeping them (`readded_version` or `cancelled_version`),
86+
remove the `removal` entry completely.
87+
88+
- Otherwise, cut out the collection's entry and paste it into a temporary buffer / file.
89+
90+
2. For every cut out metadata entry,
91+
remove the corresponding entry in `ansible.in`.
92+
93+
3. For every cut out metadata entry,
94+
find the correct place in `removed_collections` in `collections-meta.yaml`
95+
to insert the removed part from `collections-meta.yaml` and paste the entry there.
96+
Modify the entry as follows:
97+
98+
- Replace `major_version: ${NEXT_MAJOR_VERSION}` by `version: ${NEXT_MAJOR_VERSION}.0.0a1`.
99+
100+
- Remove `announce_version` if present.
101+
102+
- Remove `updates` if present.
103+
104+
10. Validate build data:
105+
106+
```sh
107+
antsibull-build lint-build-data --data-dir "${NEXT_MAJOR_VERSION}" "${NEXT_MAJOR_VERSION}"
108+
```
109+
110+
11. Commit the changes:
111+
112+
``` sh
113+
git add "${NEXT_MAJOR_VERSION}" .github/workflows/antsibull-build.yml
114+
```
115+
116+
12. Submit a PR against [the ansible-build-data repository](https://github.com/ansible-community/ansible-build-data/).

0 commit comments

Comments
 (0)