Skip to content

Commit 4f28a92

Browse files
committed
Merge branch 'main' into fix/aws_cli_redirects
2 parents f58debb + 0a0db52 commit 4f28a92

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+908
-415
lines changed

.github/workflows/preview-build.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ on:
3838
type: string
3939
default: '**'
4040
required: false
41+
path-pattern-ignore:
42+
description: 'Path pattern to ignore files.'
43+
type: string
44+
default: ''
45+
required: false
4146
free-disk-space:
4247
description: 'Free disk space before running the build'
4348
type: string
@@ -118,6 +123,7 @@ jobs:
118123
uses: tj-actions/changed-files@2f7c5bfce28377bc069a65ba478de0a74aa0ca32 # v46.0.1
119124
with:
120125
files: ${{ inputs.path-pattern != '' && inputs.path-pattern || '**' }}
126+
files_ignore: ${{ inputs.path-pattern-ignore != '' && inputs.path-pattern-ignore || '' }}
121127

122128
- name: Checkout
123129
if: env.MATCH == 'true' && (startsWith(github.event_name, 'pull_request') && steps.check-files.outputs.any_modified == 'true')

docs/_docset.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ subs:
1313
serverless-short: Serverless
1414
ece: "Elastic Cloud Enterprise"
1515
eck: "Elastic Cloud on Kubernetes"
16+
ech: "Elastic Cloud Hosted"
17+
serverless-full: "Elastic Cloud Serverless"
18+
ecloud: "Elastic Cloud"
1619

1720
features:
1821
primary-nav: false
@@ -31,6 +34,8 @@ toc:
3134
- file: on-the-web.md
3235
- file: move.md
3336
- file: redirects.md
37+
- file: cumulative-docs.md
38+
- file: branching-strategy.md
3439
- file: add-repo.md
3540
- folder: migration
3641
children:
@@ -69,6 +74,7 @@ toc:
6974
- file: navigation.md
7075
- file: extensions.md
7176
- file: page.md
77+
- file: content-sources.md
7278
- folder: syntax
7379
children:
7480
- file: index.md

docs/configure/content-sources.md

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# Content sources
2+
3+
To support multiple branching strategies for different repositories, we support the concept of a content source.
4+
5+
Next
6+
: The source for the upcoming documentation.
7+
8+
Current
9+
: The source for the active documentation.
10+
11+
12+
Our publish environments are connected to a single content source.
13+
14+
| Publish Environment | Content Source |
15+
|---------------------|----------------|
16+
| Production | `Current` |
17+
| Staging | `Current` |
18+
| Edge | `Next` |
19+
20+
This allows you as an owner of a repository to choose two different branching strategies.
21+
22+
## Branching strategies
23+
24+
The new documentation system supports 2 branching strategies.
25+
26+
Continuous deployment
27+
: This is the default where a repositories `main` or `master` branch is continuously deployed to production.
28+
29+
Tagged
30+
: Allows you to 'tag' a single git reference (typically a branch) as `current` which will be used to deploy to production.
31+
Allowing you to control the timing of when new documentation should go live.
32+
33+
34+
### Continuous deployment
35+
36+
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.
37+
38+
Once setup ensure the repository is added to our `assembler.yml` under `references`.
39+
40+
For example say you want to onboard `elastic/my-repository` into the production build:
41+
42+
```yaml
43+
references:
44+
my-repository:
45+
```
46+
47+
Is equivalent to specifying.
48+
49+
```yaml
50+
references:
51+
my-repository:
52+
next: main
53+
current: main
54+
```
55+
56+
% TODO we need navigation.yml docs
57+
Once the repository is added, its navigation still needs to be injected into to global site navigation.
58+
59+
### Tagged
60+
61+
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.
63+
64+
```yaml
65+
references:
66+
my-other-repository:
67+
next: main
68+
current: 9.0
69+
```
70+
71+
:::{note}
72+
In order for `9.0` to be onboarded it needs to first follow our [migration guide](/migration/guide/index.md) and have our documentation CI integration setup.
73+
Our CI integration checks will block until `current` is successfully configured
74+
:::
75+
76+
#### CI configuration
77+
78+
To ensure repositories that use the [tagged branching strategy](#tagged) can be onboarded correctly, our CI integration needs to have appropriate `push`
79+
branch triggers.
80+
81+
```yml
82+
name: docs-build
83+
84+
on:
85+
push:
86+
branches:
87+
- main
88+
- '\d+.\d+' <1>
89+
pull_request_target: ~
90+
merge_group: ~
91+
92+
jobs:
93+
docs-preview:
94+
uses: elastic/docs-builder/.github/workflows/preview-build.yml@main
95+
with:
96+
path-pattern: docs/**
97+
permissions:
98+
deployments: write
99+
id-token: write
100+
contents: read
101+
pull-requests: write
102+
```
103+
104+
1. Ensure version branches are built and publish their links ahead of time.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
elastic.co/docs uses our new build system, also known as "Docs V3", which uses an extended version of markdown as its markup language. Refer to our [syntax guide](/syntax/index.md) to learn more.
2+
3+
Docs for {{stack}} 9.x, {{ece}} 4.x, and {{eck}} 3.x can all be found on this site. All unversioned products, such as {{ech}} and {{serverless-full}}, are also documented on elastic.co/docs.
4+
5+
This documentation is **cumulative**. This means that a new set of docs is not published for every minor release. Instead, each page stays valid over time and incorporates version-specific changes directly within the content. [Learn how to write cumulative documentation](/contribute/cumulative-docs.md).
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
To contribute to elastic.co/guide, you must work with our [legacy documentation build system](https://github.com/elastic/docs). This system uses ASCIIDoc as its markup language.
2+
3+
Docs for {{stack}} 8.x, {{ece}} 3.x, and {{eck}} 2.x can all be found on this site.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
`applies_to` tags are rendered as badges in the documentation output. They reproduce the "key + lifecycle status + version" indicated in the content sources.
2+
3+
Specifically for versioned products, badges will display differently when the `applies_to` key specifies a product version that has not been released to our customers yet.
4+
5+
* `Planned` (if the lifecycle is preview, beta, or ga)
6+
7+
Example: {applies_to}`stack: ga 99.99`
8+
* `Deprecation planned` (if the lifecycle is deprecated)
9+
10+
Example: {applies_to}`stack: deprecated 99.99`
11+
* `Removal planned` (if the lifecycle is removed)
12+
13+
Example: {applies_to}`stack: removed 99.99`
14+
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+
17+
When multiple lifecycle statuses and versions are specified in the sources, several badges are shown.
18+
19+
:::{note}
20+
Visuals and wording in the output documentation are subject to changes and optimizations.
21+
:::
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
:::{warning}
2+
Some repositories use a [tagged branching strategy](/contribute/branching-strategy.md), which means that their docs are published from a branch that is not `main` or `master`. In these cases, documentation changes need to be made to `main` or `master`, and then backported to the relevant branches.
3+
4+
For detailed backporting guidance, refer to the example in [Choose the docs branching strategy for a repository](/contribute/branching-strategy.md#workflow-2-tagged).
5+
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).
7+
:::
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Because the new documentation site only hosts documentation for newer releases, the way that you contribute depends on the version that you want to document.
2+
3+
For a list of versions covered on [elastic.co/docs](https://www.elastic.co/docs), refer to [Find docs for your product version](https://www.elastic.co/docs/get-started/versioning-availability#find-docs-for-your-product-version). Versions prior to the versions listed on that page are documented on our legacy system, [elastic.co/guide](https://www.elastic.co/guide).
4+
5+
:::{tip}
6+
Unversioned products, such as {{ech}} and {{serverless-full}}, are documented on [elastic.co/docs](https://www.elastic.co/docs).
7+
:::

docs/contribute/add-repo.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ references:
5454
yadda-docs:
5555
```
5656

57+
:::{tip}
58+
In this file, you can optionally specify custom branches to deploy docs from, depending on your preferred [branching strategy](branching-strategy.md). You might want to change your branching strategy so you can have more control over when content added for a specific release is published.
59+
:::
60+
5761
Then, edit the [navigation.yml](https://github.com/elastic/docs-builder/blob/main/src/tooling/docs-assembler/navigation.yml) file to add the repository to the navigation.
5862

5963
For example, to add the `elastic/yadda-docs` repository under **Reference**:

0 commit comments

Comments
 (0)