Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
ab74657
draft
shainaraskas Jun 24, 2025
0129f7f
more
shainaraskas Jun 24, 2025
d2aac67
more fixes
shainaraskas Jun 25, 2025
b56af45
squish together
shainaraskas Jun 25, 2025
490dea0
unify examples
shainaraskas Jun 26, 2025
08cadd1
more
shainaraskas Jun 26, 2025
50b970a
fix
shainaraskas Jun 26, 2025
c66960f
fix
shainaraskas Jun 26, 2025
7e0757e
Merge branch 'main' into more-guidance-versioning
shainaraskas Jun 26, 2025
1c72af0
edits
shainaraskas Jun 26, 2025
0df1b3c
fix
shainaraskas Jun 26, 2025
d9af738
more bad links
shainaraskas Jun 26, 2025
4764c5b
Update docs/configure/deployment-models.md
shainaraskas Jun 26, 2025
238cee4
Merge branch 'main' into more-guidance-versioning
shainaraskas Jun 28, 2025
e874faf
Merge branch 'main' into more-guidance-versioning
shainaraskas Jun 30, 2025
b61ba65
spacing
shainaraskas Jun 30, 2025
c0d019f
local tweaks
shainaraskas Jun 30, 2025
c239f01
Apply suggestions from code review
shainaraskas Jun 30, 2025
fe70e8d
more colleen feedback
shainaraskas Jun 30, 2025
5bb5b50
Merge branch 'more-guidance-versioning' of github.com:elastic/docs-bu…
shainaraskas Jun 30, 2025
edc54a8
more
shainaraskas Jun 30, 2025
19e2f36
remove product metadata tags from the cumulative docs
shainaraskas Jun 30, 2025
eb65fea
versions.yml info
shainaraskas Jun 30, 2025
c54878e
Update docs/contribute/_snippets/tagged-warning.md
shainaraskas Jun 30, 2025
b88fb46
fix ext links
shainaraskas Jun 30, 2025
dd047fc
Merge branch 'more-guidance-versioning' of github.com:elastic/docs-bu…
shainaraskas Jun 30, 2025
b2f54a5
Merge branch 'main' into more-guidance-versioning
shainaraskas Jul 2, 2025
f2c09ec
clean up unavailable examples
shainaraskas Jul 2, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/_docset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ toc:
- file: move.md
- file: redirects.md
- file: cumulative-docs.md
- file: deployment-models.md
- file: branching-strategy.md
- file: add-repo.md
- folder: migration
children:
Expand Down Expand Up @@ -74,7 +74,7 @@ toc:
- file: navigation.md
- file: extensions.md
- file: page.md
- file: deployment-models.md
- file: content-sources.md
- folder: syntax
children:
- file: index.md
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Content sources

To support multiple deployment models for different repositories, we support the concept of a content source.
To support multiple branching strategies for different repositories, we support the concept of a content source.

Next
: The source for the upcoming documentation.
Expand All @@ -17,16 +17,16 @@ Our publish environments are connected to a single content source.
| Staging | `Current` |
| Edge | `Next` |

This allows you as an owner of a repository to choose two different deployment models.
This allows you as an owner of a repository to choose two different branching strategies.

## Deployment models
## Branching strategies

The new documentation system supports 2 deployment models.
The new documentation system supports 2 branching strategies.

Continuous deployment.
Continuous deployment
: This is the default where a repositories `main` or `master` branch is continuously deployed to production.

Tagged deployment
Tagged
: Allows you to 'tag' a single git reference (typically a branch) as `current` which will be used to deploy to production.
Allowing you to control the timing of when new documentation should go live.

Expand Down Expand Up @@ -56,7 +56,7 @@ references:
% TODO we need navigation.yml docs
Once the repository is added, its navigation still needs to be injected into to global site navigation.

### Tagged deployment
### Tagged

If you want to have more control over the timing of when your docs go live to production. Configure the repository
in our `assembler.yml` to have a fixed git reference (typically a branch) deploy the `current` content source to production.
Expand All @@ -75,7 +75,7 @@ Our CI integration checks will block until `current` is successfully configured

#### CI configuration

To ensure [tagged deployments](#tagged-deployment) can be onboarded correctly, our CI integration needs to have appropriate `push`
To ensure repositories that use the [tagged branching strategy](#tagged) can be onboarded correctly, our CI integration needs to have appropriate `push`
branch triggers.

```yml
Expand Down
12 changes: 8 additions & 4 deletions docs/contribute/_snippets/tag-processing.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,19 @@
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.

* `Planned` (if the lifecycle is preview, beta, or ga)

Example: {applies_to}`stack: ga 99.99`
* `Deprecation planned` (if the lifecycle is deprecated)

Example: {applies_to}`stack: deprecated 99.99`
* `Removal planned` (if the lifecycle is removed)

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.
Example: {applies_to}`stack: removed 99.99`

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).

When multiple lifecycle statuses and versions are specified in the sources, several badges are shown.

:::{note}
Visuals and wording in the output documentation are subject to changes and optimizations.
:::

% todo: link to central config
:::
4 changes: 2 additions & 2 deletions docs/contribute/_snippets/tagged-warning.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
:::{warning}
Some repositories use a [tagged deployment model](/contribute/deployment-models.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.
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.

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

Check failure on line 4 in docs/contribute/_snippets/tagged-warning.md

View workflow job for this annotation

GitHub Actions / build

`workflow-2-tagged-deployment` does not exist in contribute/branching-strategy.md.

Check failure on line 4 in docs/contribute/_snippets/tagged-warning.md

View workflow job for this annotation

GitHub Actions / build

`workflow-2-tagged-deployment` does not exist in contribute/branching-strategy.md.

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).
:::
2 changes: 1 addition & 1 deletion docs/contribute/add-repo.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ references:
```

:::{tip}
In this file, you can optionally specify custom branches to deploy docs from, depending on your preferred [deployment model](deployment-models.md). You might want to change your deployment model so you can have more control over when content added for a specific release is published.
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.
:::

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.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
navigation_title: Choose a deployment model
navigation_title: Choose a branching strategy
---

# Choose the docs deployment model for a repository
# Choose the docs branching strategy for a repository

With Docs V3 (elastic.co/docs), a single branch is published per repository. This branch is set to `main` (or `master`) by default. This is known as the continuous deployment model. However, it is possible to instead publish a different branch, also known as the tagged deployment model.
With Docs V3 (elastic.co/docs), a single branch is published per repository. This branch is set to `main` by default. This is known as the continuous deployment branching strategy. However, it is possible to instead publish a different branch, also known as the tagged branching strategy.

On this page, you'll learn how to choose the right deployment model for your repository, and how to change the deployment model. You'll also learn about the workflows for working in each deployment model.
On this page, you'll learn how to choose the right branching strategy for your repository, and how to change the branching strategy. You'll also learn about the workflows for working with each branching strategy.

## Why is `main` the default publication branch?

Expand All @@ -23,40 +23,61 @@ Publishing from the main branch isn’t the best option for all repositories.
* `main` can contain code and docs for unreleased versions that we don’t want to publish yet.
* The versioning scheme and release cadence of the product associated with a repository can vary, and it can be inconsistent to have the docs associated with a certain version live in a different branch than the code.

If you choose this publication model for your repository AND that repository includes {{serverless-short}} or {{ecloud}} documentation, you will need to make sure that {{serverless-short}}- and {{ecloud}}-related changes are also backported to the `current` branch in order to be published on time.
If you choose this publication model for your repository AND that repository includes {{serverless-short}} or {{ecloud}} documentation, you will need to make sure that {{serverless-short}}- and {{ecloud}}-related changes are also backported to the branch that is publishing to the public docs site.

You **don't** need to change your deployment model to enable writing docs about future versions. Review the [continuous deployment workflow](#workflow-1-default-continuous-deployment) and [](cumulative-docs.md) to learn more.
You **don't** need to change your branching strategy to enable writing docs about future versions. Review the [continuous deployment workflow](#workflow-1-default-continuous-deployment) and [](cumulative-docs.md) to learn more.

Note that regardless of the publication branch that is set, the documentation must still flag all changes introduced so far since the last major release. This is NOT an alternative to [writing docs cumulatively](cumulative-docs.md).

## How to change the published branch

Choosing to switch between publishing docs from `main` and publishing docs from a version branch is a long-term decision. This decision impacts all docs for an entire repository. Reach out to the docs team to discuss the change.

For more information, refer to [](/configure/content-sources.md).

After it has been established that a repository should publish from a version branch rather than `main`:

1. In the [docs assembler file](https://github.com/elastic/docs-builder/blob/main/src/tooling/docs-assembler/assembler.yml):
1. [Add new triggers to the `docs-build` CI integration](/configure/content-sources.md#ci-configuration). Merge these changes to `main` or `master` and the intended version branches.
2. Open a PR to trigger the CI integration and confirm that the docs build.
3. Open a PR updating the [docs assembler file](https://github.com/elastic/docs-builder/blob/main/src/tooling/docs-assembler/assembler.yml):
* Specify which is the `current` branch for the repository. This branch is the branch from which docs are deployed to production at [elastic.co/docs](http://elastic.co/docs).
* Specify which is the `next` branch for the repository. The branch defined as `next` publishes docs internally to [staging-website.elastic.co/docs](http://staging-website.elastic.co/docs)
* Setting this branch to the next version branch in line is a good practice to preview docs change for an upcoming version.
* Otherwise, keeping it set to `main` is also an option since this is where the content is initially developed and merged. This is the default.
2. [Add new triggers to the `docs-build` CI integration](/configure/deployment-models.md#ci-configuration).
3. Add an action as part of that repo’s release process for the release manager to update this same assembler file and bump the `current` branch with each release, as appropriate. The `next` branch also needs to be bumped if it is not set to `main`.
4. When these releases happen, create a PR against the [assembler file](https://github.com/elastic/docs-builder/blob/main/src/tooling/docs-assembler/assembler.yml) that defines the new `current` branch, to merge on release day.
4. In the assembler PR, add the `ci` label. After CI runs, confirm that the intended version branches are publishing to the link service. When links are being published as intended, they can be found at the following URL, where `repo` is your repo name and `branch` is your newly configured branch:

```text
elastic-docs-link-index.s3.us-east-2.amazonaws.com/elastic/<repo>/<branch>/links.json
```
5. Rerun the `validate-assembler` check on the PR.
6. After checks pass and the docs engineering team approves, you can merge the PR.

After these steps are completed, the docs engineering team needs to release a new version of our build tool to complete the process. This process will be decoupled in a future release. After a new version is released, the switch is complete and the production documentation reflects the specified current branch.

### Update the release process

When you publish from specific version branches, you need to bump the version branch as part of the release process.

Add an action as part of that repo’s release process for the release manager to update this same assembler file and bump the `current` branch with each release, as appropriate. The `next` branch also needs to be bumped if it is not set to `main`.

When these releases happen, create a PR against the [assembler file](https://github.com/elastic/docs-builder/blob/main/src/tooling/docs-assembler/assembler.yml) that defines the new `current` branch, to merge on release day.

:::{tip}
Regardless of the branching strategy, you also need to update the current version in [versions.yml](https://github.com/elastic/docs-builder/blob/main/src/Elastic.Documentation.Configuration/versions.yml) as part of your release process. This version number is used in documentation variables and drives our [dynamic version badge logic](/contribute/cumulative-docs.md#how-do-these-tags-behave-in-the-output).
:::

For more information, refer to [](/configure/deployment-models.md).

## Workflow 1 (default): Continuous deployment

Learn how to make updates in the continuous deployment model, where the repo is publishing docs from `main`.
Learn how to make updates in the continuous deployment branching strategy, where the repo is publishing docs from `main`.

### Where to make docs changes [make-changes-cd]

Initiate the changes by opening a PR against the `main` branch of the repo.

### How to write those changes [write-changes-cd]

In our markdown-based documentation system, we [write docs cumulatively](cumulative-docs.md) regardless of the publication model selected.
In elastic.co/docs (Docs V3), we [write docs cumulatively](cumulative-docs.md) regardless of the branching strategy selected.

### Merging and backporting [merge-backport-cd]

Expand All @@ -74,21 +95,17 @@ When a repo is publishing docs from its `main` branch, no backporting is needed.
If you don’t want to hold on too many PRs to publish on release day, merge them to a feature branch, so you only have to merge this feature branch to `main` on release day.
:::

### More examples [more-examples-cd]

We’ve prepared a few end-to-end examples to help in [Figma](https://www.figma.com/design/CZDl0szuGsQfJhFpnwJVWS/Applies_to-Docs-V3?node-id=0-1&p=f&t=lBPrvde0k5zg9U0E-0).
## Workflow 2: Tagged

## Workflow 2: Tagged deployment

Learn how to make updates in the continuous deployment model, where the repo is publishing docs from a specific `version` branch.
Learn how to make updates in the continuous deployment branching strategy, where the repo is publishing docs from a specific version branch.

### Where to make docs changes [make-changes-td]

Initiate the changes by opening a PR against the `main` branch of the repo. The changes will be backported to the relevant version branches as detailed below.
Initiate the changes by opening a PR against the `main` branch of the repo, and backport the changes to the relevant version branches as detailed below.

### How to write those changes [write-changes-td]

In our markdown-based documentation system, we [write docs cumulatively](cumulative-docs.md) regardless of the publication model selected.
In elastic.co/docs (Docs V3), we [write docs cumulatively](cumulative-docs.md) regardless of the branching strategy selected.

### Merging and backporting [merge-backport-td]

Expand Down Expand Up @@ -117,7 +134,3 @@ For example, in a situation where 9.0, 9.1, and 9.2 are already released, and th
:::{note}
While you *can* backport to versions prior to the `current` version when applicable to maintain parity between the code and the docs on a given branch, that content will not be used in the current state of the docs.
:::

### More examples [more-examples-td]

We’ve prepared a few end-to-end examples to help in [Figma](https://www.figma.com/design/CZDl0szuGsQfJhFpnwJVWS/Applies_to-Docs-V3?node-id=0-1&p=f&t=lBPrvde0k5zg9U0E-0).
Loading
Loading