Skip to content

Commit 48cd485

Browse files
authored
Add ConfigurationExporter to export all configurations to a central location. (#1568)
* Add ConfigurationExporter to export all congigurations to a central location. In preparation of separating configuration from releases. * Centralize all configuration files under /config * update config locations in our docs * fix configuration exporter copying by name not fullname * fix fallback to embedded resource and ensure we refresh fileinfo since with mockdata we need to * add configuration exporter back * remove embedded source gen since it behaves different on windows
1 parent 6115126 commit 48cd485

40 files changed

+344
-155
lines changed
File renamed without changes.
File renamed without changes.

docs-builder.sln

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,14 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elastic.Documentation.Legac
111111
EndProject
112112
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elastic.Documentation.LegacyDocs.Tests", "tests\Elastic.Documentation.LegacyDocs.Tests\Elastic.Documentation.LegacyDocs.Tests.csproj", "{164F55EC-9412-4CD4-81AD-3598B57632A6}"
113113
EndProject
114+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "config", "config", "{6FAB566B-76E3-4E90-8A5C-E75B0F1E1C63}"
115+
ProjectSection(SolutionItems) = preProject
116+
config\versions.yml = config\versions.yml
117+
config\assembler.yml = config\assembler.yml
118+
config\legacy-url-mappings.yml = config\legacy-url-mappings.yml
119+
config\navigation.yml = config\navigation.yml
120+
EndProjectSection
121+
EndProject
114122
Global
115123
GlobalSection(SolutionConfigurationPlatforms) = preSolution
116124
Debug|Any CPU = Debug|Any CPU

docs/configure/content-sources.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Tagged
3535

3636
This is the default. To get started, follow our [guide](/migration/guide/index.md) to set up the new docs folder structure and CI configuration.
3737

38-
Once setup ensure the repository is added to our `assembler.yml` under `references`.
38+
Once setup ensure the repository is added to our [`assembler.yml`](https://github.com/elastic/docs-builder/blob/main/config/assembler.yml) under `references`.
3939

4040
For example say you want to onboard `elastic/my-repository` into the production build:
4141

@@ -59,7 +59,7 @@ Once the repository is added, its navigation still needs to be injected into to
5959
### Tagged
6060
6161
If you want to have more control over the timing of when your docs go live to production. Configure the repository
62-
in our `assembler.yml` to have a fixed git reference (typically a branch) deploy the `current` content source to production.
62+
in our [`assembler.yml`](https://github.com/elastic/docs-builder/blob/main/config/assembler.yml) to have a fixed git reference (typically a branch) deploy the `current` content source to production.
6363

6464
```yaml
6565
references:
@@ -101,4 +101,4 @@ jobs:
101101
pull-requests: write
102102
```
103103

104-
1. Ensure version branches are built and publish their links ahead of time.
104+
1. Ensure version branches are built and publish their links ahead of time.

docs/configure/site/content.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# `assembler.yml`
22

3-
The global navigation is defined in the `assembler.yml` file. This file can roughly be thought of as the V3 equivalent of conf.yaml in the asciidoc build system. This file, which writers own, allows for arbitrary nesting of `docset.yml` and `toc.yml` references. This file will live in the `elastic/docs-content` repository, but will not build or have any influence over the `docs-builder` builds in that repo.
3+
The global navigation is defined in the [`assembler.yml`](https://github.com/elastic/docs-builder/blob/main/config/assembler.yml) file. This file can roughly be thought of as the V3 equivalent of conf.yaml in the asciidoc build system. This file, which writers own, allows for arbitrary nesting of `docset.yml` and `toc.yml` references. This file will live in the `elastic/docs-content` repository, but will not build or have any influence over the `docs-builder` builds in that repo.
44

5-
The global navigation that is defined in `assembler.yml` can be composed of three main resources:
5+
The global navigation that is defined in [`assembler.yml`](https://github.com/elastic/docs-builder/blob/main/config/assembler.yml) can be composed of three main resources:
66
1. Local TOC files: toc.yml files that live in the docs-content repository.
77
2. External TOC files: A subset of a content set (represented by a toc.yml file) that is external to the docs-content repository.
88
3. External content set declarations: An entire docset.yml file that is external to the docs-content repository.
99

10-
The `assembler.yml` file might look something like this:
10+
The [`assembler.yml`](https://github.com/elastic/docs-builder/blob/main/config/assembler.yml) file might look something like this:
1111

1212
```yaml
1313

docs/configure/site/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ TBD
2222
In both the AsciiDoctor- and V3-based system, there is site-wide configuration where you list all content sources, where to find those sources, and in what order they should be added to the site.
2323

2424
In the AsciiDoctor system, this all happens in one YAML file in the `/docs` repo. In the V3 system:
25-
* Content configuration happens in the [`assembler.yml`](https://github.com/elastic/docs-builder/blob/main/src/tooling/docs-assembler/assembler.yml) file in `docs-builder`.
26-
* Navigation configuration happens in the [`navigation.yml`](https://github.com/elastic/docs-builder/blob/main/src/tooling/docs-assembler/navigation.yml) file in `docs-builder`.
25+
* Content configuration happens in the [`assembler.yml`](https://github.com/elastic/docs-builder/blob/main/config/assembler.yml) file in `docs-builder`.
26+
* Navigation configuration happens in the [`navigation.yml`](https://github.com/elastic/docs-builder/blob/main/config/navigation.yml) file in `docs-builder`.
2727

2828
[assembler.yml](./content.md)
2929

docs/contribute/_snippets/tag-processing.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,9 @@ Specifically for versioned products, badges will display differently when the `a
1212

1313
Example: {applies_to}`stack: removed 99.99`
1414

15-
This is computed at build time (there is a docs build every 30 minutes). The documentation team tracks and maintains released versions for these products centrally in [versions.yml](https://github.com/elastic/docs-builder/blob/main/src/Elastic.Documentation.Configuration/versions.yml).
16-
15+
This is computed at build time (there is a docs build every 30 minutes). The documentation team tracks and maintains released versions for these products centrally in [`versions.yml`](https://github.com/elastic/docs-builder/blob/main/config/versions.yml).
1716
When multiple lifecycle statuses and versions are specified in the sources, several badges are shown.
1817

1918
:::{note}
2019
Visuals and wording in the output documentation are subject to changes and optimizations.
21-
:::
20+
:::

docs/contribute/_snippets/tagged-warning.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ Some repositories use a [tagged branching strategy](/contribute/branching-strate
33

44
For detailed backporting guidance, refer to the example in [Choose the docs branching strategy for a repository](/contribute/branching-strategy.md#workflow-2-tagged).
55

6-
To determine the published branches for a repository, find the repository in [assembler.yml](https://github.com/elastic/docs-builder/blob/main/src/tooling/docs-assembler/assembler.yml).
6+
To determine the published branches for a repository, find the repository in [`assembler.yml`](https://github.com/elastic/docs-builder/blob/main/config/assembler.yml).
77
:::

0 commit comments

Comments
 (0)