Skip to content

Commit cc2e6ff

Browse files
authored
Merge branch 'main' into fix/versioning_dropdown
2 parents 5cb01f2 + 0bb30ec commit cc2e6ff

File tree

8 files changed

+327
-9
lines changed

8 files changed

+327
-9
lines changed

docs/_docset.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ toc:
4242
- file: branching-strategy.md
4343
- file: add-repo.md
4444
- file: release-new-version.md
45+
- file: changelog.md
4546
- hidden: locally.md
4647
- hidden: on-the-web.md
4748
- folder: building-blocks
@@ -152,6 +153,10 @@ toc:
152153
- file: inbound-links-validate.md
153154
- file: inbound-links-validate-all.md
154155
- file: inbound-links-validate-link-reference.md
156+
- folder: release
157+
children:
158+
- file: index.md
159+
- file: changelog-add.md
155160
- folder: migration
156161
children:
157162
- file: index.md

docs/cli/index.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@ navigation_title: CLI (docs-builder)
55
# Command line interface
66

77
`docs-builder` is the binary used to invoke various commands.
8-
These commands can be roughly grouped into three main categories
8+
These commands can be roughly grouped into four main categories
99

1010
- [Documentation Set commands](#documentation-set-commands)
1111
- [Link commands](#link-commands)
1212
- [Assembler commands](#assembler-commands)
13+
- [Release doc commands](#release-doc-commands)
1314

1415
### Global options
1516

@@ -22,7 +23,7 @@ The following options are available for all commands:
2223
: Explicitly set the configuration source one of `local`, `remote` or `embedded`. Defaults to `local` if available
2324
other wise `embedded`
2425

25-
## Documentation Set Commands
26+
## Documentation set commands
2627

2728
Commands that operate over a single documentation set.
2829

@@ -32,16 +33,22 @@ These commands are typically what you interface with when you are working on the
3233

3334
[See available CLI commands for documentation sets](docset/index.md)
3435

35-
## Link Commands
36+
## Link commands
3637

3738
Outbound links, those going from the documentation set to other sources, are validated as part of the build process.
3839

3940
Inbound links, those going from other sources to the documentation set, are validated using specialized commands.
4041

4142
[See available CLI commands for inbound links](links/index.md)
4243

43-
## Assembler Commands
44+
## Assembler commands
4445

4546
Assembler builds bring together all isolated documentation set builds and turn them into the overall documentation that gets published.
4647

4748
[See available CLI commands for assembler](assembler/index.md)
49+
50+
## Release doc commands
51+
52+
Commands that pertain to creating and publishing product release documentation.
53+
54+
[See available CLI commands for release docs](release/index.md)

docs/cli/release/changelog-add.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# changelog add
2+
3+
Create a changelog file that describes a single item in the release documentation.
4+
For details and examples, go to [](/contribute/changelog.md).
5+
6+
## Usage
7+
8+
```sh
9+
docs-builder changelog add [options...] [-h|--help]
10+
```
11+
12+
## Options
13+
14+
`--action <string?>`
15+
: Optional: What users must do to mitigate.
16+
17+
`--areas <string[]?>`
18+
: Optional: Areas affected (comma-separated or specify multiple times).
19+
20+
`--config <string?>`
21+
: Optional: Path to the changelog.yml configuration file. Defaults to `docs/changelog.yml`.
22+
23+
`--description <string?>`
24+
: Optional: Additional information about the change (max 600 characters).
25+
26+
`--feature-id <string?>`
27+
: Optional: Feature flag ID
28+
29+
`--highlight <bool?>`
30+
: Optional: Include in release highlights.
31+
32+
`--impact <string?>`
33+
: Optional: How the user's environment is affected.
34+
35+
`--issues <string[]?>`
36+
: Optional: Issue numbers (comma-separated or specify multiple times).
37+
38+
`--output <string?>`
39+
: Optional: Output directory for the changelog fragment. Defaults to current directory.
40+
41+
`--products <List<ProductInfo>>`
42+
: Required: Products affected in format "product target lifecycle, ..." (for example, `"elasticsearch 9.2.0 ga, cloud-serverless 2025-08-05"`).
43+
: The valid product identifiers are listed in [products.yml](https://github.com/elastic/docs-builder/blob/main/config/products.yml).
44+
: The valid lifecycles are listed in [ChangelogConfiguration.cs](https://github.com/elastic/docs-builder/blob/main/src/services/Elastic.Documentation.Services/Changelog/ChangelogConfiguration.cs).
45+
46+
`--pr <string?>`
47+
: Optional: Pull request number.
48+
49+
`--subtype <string?>`
50+
: Optional: Subtype for breaking changes (for example, `api`, `behavioral`, or `configuration`).
51+
: The valid subtypes are listed in [ChangelogConfiguration.cs](https://github.com/elastic/docs-builder/blob/main/src/services/Elastic.Documentation.Services/Changelog/ChangelogConfiguration.cs).
52+
53+
`--title <string>`
54+
: Required: A short, user-facing title (max 80 characters)
55+
56+
`--type <string>`
57+
: Required: Type of change (for example, `feature`, `enhancement`, `bug-fix`, or `breaking-change`).
58+
: The valid types are listed in [ChangelogConfiguration.cs](https://github.com/elastic/docs-builder/blob/main/src/services/Elastic.Documentation.Services/Changelog/ChangelogConfiguration.cs).

docs/cli/release/index.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
navigation_title: "release"
3+
---
4+
5+
# Release doc commands
6+
7+
These commands are associated with product release documentation.
8+
9+
## Changelog commands
10+
11+
- [changelog add](changelog-add.md) - Create a changelog file
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
2+
```yaml
3+
##### Required fields #####
4+
title:
5+
6+
# A required string that is a short, user-facing headline
7+
# Max 80 characters
8+
9+
type:
10+
11+
# A required string that contains the type of change.
12+
# Refer to https://github.com/elastic/docs-builder/blob/main/src/services/Elastic.Documentation.Services/Changelog/ChangelogConfiguration.cs for the acceptable values.
13+
14+
products:
15+
16+
# A required array of objects that denote the affected products and their target release.
17+
18+
- product:
19+
20+
# A required string with a predefined product ID used for release note routing,
21+
# filters, and categorization.
22+
# Refer to https://github.com/elastic/docs-builder/blob/main/config/products.yml for the acceptable values.
23+
24+
target:
25+
26+
# An optional string that facilitates pre-release doc previews.
27+
# For products with version releases, it contains the target version number (V.R.M).
28+
# For products with date releases, it contains the target release date
29+
# or the date the PR was merged.
30+
31+
lifecycle:
32+
33+
# An optional string for new features and enhancements that have a specific availability.
34+
# Refer to https://github.com/elastic/docs-builder/blob/main/src/services/Elastic.Documentation.Services/Changelog/ChangelogConfiguration.cs for the acceptable values.
35+
36+
##### Optional fields #####
37+
action:
38+
39+
# An optional string that describes what users must do to mitigate the impact
40+
# of a breaking change or known issue.
41+
42+
areas:
43+
44+
# An optional array of strings that denotes the parts/components/services of the
45+
# product that are specifically affected.
46+
# The list of valid values will vary by product.
47+
# The docs for each release typically group the changes by type then by area.
48+
49+
description:
50+
51+
# An optional string that provides additional information about what has changed.
52+
# Max 600 characters
53+
54+
feature-id:
55+
56+
# An optional string to associate a feature or enhancement with a unique feature flag
57+
58+
highlight:
59+
60+
# An optional boolean for items that should be included in release highlights
61+
# or the UI to draw users' attention.
62+
63+
impact:
64+
65+
# An optional string that describes how the user's environment is/will be
66+
# affected by a breaking change.
67+
68+
issues:
69+
70+
# An optional array of strings that contain URLs for issues that are relevant to the PR.
71+
# They are externalized in the release docs so users can follow the links and
72+
# understand the context.
73+
74+
pr:
75+
76+
# An optional string that contains the pull request identifier.
77+
# It is externalized in the release docs so users can follow the link and find more details.
78+
79+
subtype:
80+
81+
# An optional string that applies only to breaking changes and further subdivides that type.
82+
# Refer to https://github.com/elastic/docs-builder/blob/main/src/services/Elastic.Documentation.Services/Changelog/ChangelogConfiguration.cs for the acceptable values.
83+
```

docs/contribute/changelog.md

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
# Add changelog entries
2+
3+
The `docs-builder changelog add` command creates a new changelog file from command-line input.
4+
By adding a file for each notable change, you can ultimately generate release documention with a consistent layout for all your products.
5+
6+
:::{note}
7+
This command is associated with an ongoing release docs initiative.
8+
Additional workflows are still to come for managing the list of changelogs in each release.
9+
:::
10+
11+
The command generates a YAML file that uses the following schema:
12+
13+
:::{dropdown} Changelog schema
14+
::::{include} /contribute/_snippets/changelog-fields.md
15+
::::
16+
:::
17+
18+
## Command options
19+
20+
The command supports all of the following options, which generally align with fields in the changelog schema:
21+
22+
```sh
23+
Usage: changelog add [options...] [-h|--help] [--version]
24+
25+
Add a new changelog fragment from command-line input
26+
27+
Options:
28+
--title <string> Required: A short, user-facing title (max 80 characters) (Required)
29+
--type <string> Required: Type of change (feature, enhancement, bug-fix, breaking-change, etc.) (Required)
30+
--products <List<ProductInfo>> Required: Products affected in format "product target lifecycle, ..." (e.g., "elasticsearch 9.2.0 ga, cloud-serverless 2025-08-05") (Required)
31+
--subtype <string?> Optional: Subtype for breaking changes (api, behavioral, configuration, etc.) (Default: null)
32+
--areas <string[]?> Optional: Area(s) affected (comma-separated or specify multiple times) (Default: null)
33+
--pr <string?> Optional: Pull request URL (Default: null)
34+
--issues <string[]?> Optional: Issue URL(s) (comma-separated or specify multiple times) (Default: null)
35+
--description <string?> Optional: Additional information about the change (max 600 characters) (Default: null)
36+
--impact <string?> Optional: How the user's environment is affected (Default: null)
37+
--action <string?> Optional: What users must do to mitigate (Default: null)
38+
--feature-id <string?> Optional: Feature flag ID (Default: null)
39+
--highlight <bool?> Optional: Include in release highlights (Default: null)
40+
--output <string?> Optional: Output directory for the changelog fragment. Defaults to current directory (Default: null)
41+
--config <string?> Optional: Path to the changelog.yml configuration file. Defaults to 'docs/changelog.yml' (Default: null)
42+
```
43+
44+
### Product format
45+
46+
The `--products` parameter accepts products in the format `"product target lifecycle, ..."` where:
47+
48+
- `product` is the product ID from [products.yml](https://github.com/elastic/docs-builder/blob/main/config/products.yml) (required)
49+
- `target` is the target version or date (optional)
50+
- `lifecycle` is one of: `preview`, `beta`, or `ga` (optional)
51+
52+
Examples:
53+
54+
- `"kibana 9.2.0 ga"`
55+
- `"cloud-serverless 2025-08-05"`
56+
- `"cloud-enterprise 4.0.3, cloud-hosted 2025-10-31"`
57+
58+
## Changelog configuration
59+
60+
Some of the fields in the changelog accept only a specific set of values.
61+
62+
:::{important}
63+
64+
- Product values must exist in [products.yml](https://github.com/elastic/docs-builder/blob/main/config/products.yml). Invalid products will cause the command to fail.
65+
- Type, subtype, and lifecycle values must match the available values defined in [ChangelogConfiguration.cs](https://github.com/elastic/docs-builder/blob/main/src/services/Elastic.Documentation.Services/Changelog/ChangelogConfiguration.cs). Invalid values will cause the command to fail.
66+
:::
67+
68+
If you want to further limit the list of values, you can optionally create a configuration file.
69+
Refer to [changelog.yml.example](https://github.com/elastic/docs-builder/blob/main/config/changelog.yml.example).
70+
71+
By default, the command checks the following path: `docs/changelog.yml`.
72+
You can specify a different path with the `--config` command option.
73+
74+
If a configuration file exists, the command validates all its values before generating the changelog file:
75+
76+
- If the configuration file contains `lifecycle`, `product`, `subtype`, or `type` values that don't match the values in `products.yml` and `ChangelogConfiguration.cs`, validation fails. The changelog file is not created.
77+
- If the configuration file contains `areas` values and they don't match what you specify in the `--areas` command option, validation fails. The changelog file is not created.
78+
79+
## Examples
80+
81+
The following command creates a changelog for a bug fix that applies to two products:
82+
83+
```sh
84+
docs-builder changelog add \
85+
--title "Fixes enrich and lookup join resolution based on minimum transport version" \
86+
--type bug-fix \ <1>
87+
--products "elasticsearch 9.2.3, cloud-serverless 2025-12-02" \ <2>
88+
--areas "ES|QL"
89+
--pr "https://github.com/elastic/elasticsearch/pull/137431" <3>
90+
```
91+
92+
1. The type values are defined in [ChangelogConfiguration.cs](https://github.com/elastic/docs-builder/blob/main/src/services/Elastic.Documentation.Services/Changelog/ChangelogConfiguration.cs).
93+
2. The product values are defined in [products.yml](https://github.com/elastic/docs-builder/blob/main/config/products.yml).
94+
3. At this time, the PR value can be a number or a URL; it is not validated.
95+
96+
The output file has the following format:
97+
98+
```yaml
99+
pr: https://github.com/elastic/elasticsearch/pull/137431
100+
type: bug-fix
101+
products:
102+
- product: elasticsearch
103+
target: 9.2.3
104+
- product: cloud-serverless
105+
target: 2025-12-02
106+
title: Fixes enrich and lookup join resolution based on minimum transport version
107+
areas:
108+
- ES|QL
109+
```

docs/contribute/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Use these guides for tasks like managing documentation files and folders, config
1010

1111
- [Move files and folders](move.md): Move files or folders and automatically update all links in the documentation.
1212
- [Manage redirects across doc sets](redirects.md): Set up redirects when moving or deleting pages to prevent broken links.
13+
- [Add changelog entries](changelog.md): Create changelog fragments using the command-line interface.
1314

1415
## Repository management
1516

0 commit comments

Comments
 (0)