Skip to content

Commit bed0e70

Browse files
authored
Merge branch 'main' into dependabot/github_actions/dot-github/workflows/actions/checkout-5
2 parents 8edf683 + 7804439 commit bed0e70

File tree

111 files changed

+1010
-666
lines changed

Some content is hidden

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

111 files changed

+1010
-666
lines changed

.github/updatecli/updatecli.d/versions.yml

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,14 @@ actions:
2525
title: '[Automation] Bump product version numbers'
2626

2727
sources:
28-
# TODO Automate only for patch releases
29-
# latest-stack-version:
30-
# name: Get latest stack version
31-
# kind: githubrelease
32-
# transformers:
33-
# - trimprefix: v
34-
# spec:
35-
# owner: elastic
36-
# repository: elasticsearch
37-
# token: '{{ requiredEnv "GITHUB_TOKEN" }}'
38-
# username: '{{ requiredEnv "GITHUB_ACTOR" }}'
39-
# versionfilter:
40-
# kind: regex
41-
# pattern: "v9.(\\d*).(\\d*)$"
28+
latest-stack-version:
29+
name: Get latest stack version
30+
kind: json
31+
spec:
32+
files:
33+
- https://artifacts.elastic.co/releases/stack.json
34+
engine: dasel/v2
35+
key: "releases.last().version"
4236

4337
latest-edot-android-version:
4438
name: Get latest release version for the apm-agent-android
@@ -292,15 +286,15 @@ sources:
292286
pattern: "^@elastic/apm-rum@(\\d*).(\\d*).(\\d*)$"
293287

294288
targets:
295-
# update-docs-docset-stack:
296-
# name: 'Update config/versions.yml stack {{ source "latest-stack-version" }}'
297-
# scmid: githubConfig
298-
# sourceid: latest-stack-version
299-
# kind: file
300-
# spec:
301-
# file: config/versions.yml
302-
# matchpattern: '(stack: &stack\s+base: [\d\.]+\s+current:)\s+(.+)'
303-
# replacepattern: '$1 {{ source "latest-stack-version" }}'
289+
update-docs-docset-stack:
290+
name: 'Update config/versions.yml stack {{ source "latest-stack-version" }}'
291+
scmid: githubConfig
292+
sourceid: latest-stack-version
293+
kind: file
294+
spec:
295+
file: config/versions.yml
296+
matchpattern: '(stack: &stack\s+base: [\d\.]+\s+current:)\s+(.+)'
297+
replacepattern: '$1 {{ source "latest-stack-version" }}'
304298

305299
update-docs-docset-android:
306300
name: 'Update config/versions.yml edot-android {{ source "latest-edot-android-version" }}'

.github/workflows/prerelease.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
with:
3636
prefix: '${{ steps.repo-basename.outputs.value }}'
3737
- name: Upload artifact
38-
uses: actions/upload-pages-artifact@v3.0.1
38+
uses: actions/upload-pages-artifact@v4.0.0
3939
with:
4040
path: .artifacts/docs/html
4141

.github/workflows/preview-build.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ on:
5353
type: boolean
5454
default: false
5555
required: false
56+
enable-cumulative-comment:
57+
description: 'Enable info comment'
58+
type: boolean
59+
default: false
60+
required: false
5661

5762
permissions:
5863
contents: read
@@ -463,6 +468,7 @@ jobs:
463468
ALL_CHANGED_FILES: ${{ needs.check.outputs.all_changed_files }}
464469
PATH_PREFIX: ${{ needs.build.outputs.path_prefix }}
465470
with:
471+
# language=javascript
466472
script: |
467473
const title = '## 🔍 Preview links for changed docs'
468474
const changedMdFiles = process.env.ALL_CHANGED_FILES
@@ -530,3 +536,58 @@ jobs:
530536
body:body.join('\n'),
531537
});
532538
}
539+
- name: Comment on docs changes about versioning requirements
540+
if: inputs.enable-cumulative-comment == 'true'
541+
uses: actions/github-script@v7
542+
with:
543+
github-token: ${{ secrets.GITHUB_TOKEN }}
544+
# language=javascript
545+
script: |
546+
const pr = context.payload.pull_request;
547+
const prNum = pr.number;
548+
const owner = context.repo.owner;
549+
const repo = context.repo.repo;
550+
551+
552+
const { data: comments } = await github.rest.issues.listComments({
553+
owner, repo, issue_number: prNum
554+
});
555+
556+
const title = '## ℹ️ Important: Docs version tagging';
557+
558+
const existingComment = comments.find(c =>
559+
c.user.type === 'Bot' &&
560+
c.body.startsWith(title)
561+
);
562+
563+
if (existingComment) return;
564+
565+
const body = `${title}
566+
567+
👋 Thanks for updating the docs! Just a friendly reminder that our docs are now **cumulative**. This means all 9.x versions are documented on the same page and published off of the main branch, instead of creating separate pages for each minor version.
568+
569+
We use [applies_to tags](https://elastic.github.io/docs-builder/syntax/applies) to mark version-specific features and changes.
570+
571+
<details>
572+
<summary>Expand for a quick overview</summary>
573+
574+
### When to use applies_to tags:
575+
✅ At the page level to indicate which products/deployments the content applies to (mandatory)
576+
✅ When features change state (e.g. preview, ga) in a specific version
577+
✅ When availability differs across deployments and environments
578+
579+
### What NOT to do:
580+
❌ Don't remove or replace information that applies to an older version
581+
❌ Don't add new information that applies to a specific version without an applies_to tag
582+
❌ Don't forget that applies_to tags can be used at the page, section, and inline level
583+
</details>
584+
585+
### 🤔 Need help?
586+
- Check out the [cumulative docs guidelines](https://elastic.github.io/docs-builder/contribute/cumulative-docs/)
587+
- Reach out in the [#docs](https://elastic.slack.com/archives/C0JF80CJZ) Slack channel`;
588+
589+
await github.rest.issues.createComment({
590+
owner, repo,
591+
issue_number: prNum,
592+
body
593+
});

.github/workflows/updatecli.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
- uses: elastic/oblt-actions/updatecli/run@v1
3636
with:
3737
command: apply --config .github/updatecli/updatecli.d/versions.yml --values .github/updatecli/values.d/scm.yml
38+
version-file: .updatecli-version
3839
env:
3940
GITHUB_TOKEN: ${{ steps.get_token.outputs.token }}
4041

.updatecli-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v0.105.1

CONTRIBUTING.MD

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Contributing
2+
3+
## Prerequisites
4+
5+
- [.NET 9.0 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/9.0)
6+
- [Node.js 22.13.1 (LTS)](https://nodejs.org/en/blog/release/v22.13.1)
7+
- [Aspire 9.4.1](https://learn.microsoft.com/en-us/dotnet/aspire/)
8+
```bash
9+
dotnet workload install aspire
10+
```
11+
12+
## Validate the fully assembled documentation
13+
14+
```bash
15+
dotnet run --project aspire
16+
```
17+
18+
Will spin up all our services and clone and build all the documentation sets.
19+
20+
```markdown
21+
dotnet run --project aspire -- --assume-cloned --skip-private-repositories
22+
```
23+
24+
`--assume-cloned` will assume a documentation set set is already cloned if available locally.
25+
26+
`--skip-private-repositories` will skip cloning private repositories. It will also inject our `docs-builder docs into the
27+
navigation. This allows us to validate new features' effect on the assembly process.
28+
29+
Our [Integration Tests](./tests-integration/Elastic.Assembler.IntegrationTests) use this exact command to validate the
30+
assembler builds.
31+
32+
## Continuously build all assets during development.
33+
34+
```shell
35+
./build.sh watch
36+
```
37+
38+
This will monitor code, cshtml template files & static files and reload the application
39+
if any changes.
40+
41+
Web assets are reloaded through `parcel watch` and don't require a recompilation.
42+
43+
Markdown files are refreshed automatically through livereload
44+
45+
Code or layout changes will relaunch the server automatically
46+
47+
# Release Process
48+
49+
This section outlines the process for releasing a new version of this project.
50+
51+
## Versioning
52+
53+
This project uses [Semantic Versioning](https://semver.org/) and its version is
54+
automatically determined by [release-drafter](https://github.com/release-drafter/release-drafter)
55+
based on the labels of the pull requests merged into the `main` branch.
56+
57+
See the [release-drafter configuration](./.github/release-drafter.yml) for more details.
58+
59+
## Creating a New Release
60+
61+
To create a new release trigger the [release](https://github.com/elastic/docs-builder/actions/workflows/release.yml) workflow on the `main` branch.
62+
63+
Every time a pull request is merged into the `main` branch, release-drafter will
64+
create a draft release or update the existing draft release in the [Releases](https://github.com/elastic/docs-builder/releases) page.
65+
66+
To create a new release you need to publish the existing draft release created by release-drafter.
67+
68+
> [!IMPORTANT]
69+
> Make sure the [release-drafter workflow](https://github.com/elastic/docs-builder/actions/workflows/release-drafter.yml) is finished before publishing the release.
70+
71+
> [!NOTE]
72+
> When a release is published, the [create-major-tag workflow](./.github/workflows/create-major-tag.yml)
73+
> will force push a new major tag in the format `vX` where `X` is the major version of the release.
74+
> For example, if the release is `1.2.3` was published, the workflow will force push a new tag `v1` on the same commit.

0 commit comments

Comments
 (0)