You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `docs-builder changelog add` command creates a new changelog fragment file from command-line input. This is useful for creating changelog entries as part of your development workflow.
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.
4
5
5
-
## `docs-builder changelog add`
6
-
7
-
Create a new changelog fragment with required and optional fields. For example:
8
-
9
-
```sh
10
-
docs-builder changelog add \
11
-
--title "Fixes enrich and lookup join resolution based on minimum transport version" \
- 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.
21
-
- 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.
22
-
- The command validates all values before generating the changelog file. If validation fails, no file is created.
23
-
- At this time, the PR value can be a number or a URL; it is not validated.
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.
24
9
:::
25
10
26
-
## Product format
27
-
28
-
The `--products` parameter accepts products in the format `"product target lifecycle, ..."` where:
29
-
30
-
-`product` is the product ID from [products.yml](https://github.com/elastic/docs-builder/blob/main/config/products.yml) (required)
31
-
-`target` is the target version or date (optional)
32
-
-`lifecycle` is one of: `preview`, `beta`, or `ga` (optional)
11
+
The command generates a YAML file that uses the following schema:
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" \
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.
0 commit comments