[8.14] Add ECS version metadata to doc link service (#182192) (#182316)

# Backport

This will backport the following commits from `main` to `8.14`:
- [Add ECS version metadata to doc link service
(#182192)](https://github.com/elastic/kibana/pull/182192)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Lisa
Cawley","email":"lcawley@elastic.co"},"sourceCommit":{"committedDate":"2024-05-01T23:21:13Z","message":"Add
ECS version metadata to doc link service
(#182192)","sha":"e0c3cc638002d3b08207a70f3e278ada73d4b7cb","branchLabelMapping":{"^v8.15.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Docs","release_note:skip","docs","v8.14.0","v8.12.3","v8.13.3","v8.15.0"],"title":"Add
ECS version metadata to doc link
service","number":182192,"url":"https://github.com/elastic/kibana/pull/182192","mergeCommit":{"message":"Add
ECS version metadata to doc link service
(#182192)","sha":"e0c3cc638002d3b08207a70f3e278ada73d4b7cb"}},"sourceBranch":"main","suggestedTargetBranches":["8.14","8.12","8.13"],"targetPullRequestStates":[{"branch":"8.14","label":"v8.14.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.12","label":"v8.12.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.13","label":"v8.13.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.15.0","branchLabelMappingKey":"^v8.15.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/182192","number":182192,"mergeCommit":{"message":"Add
ECS version metadata to doc link service
(#182192)","sha":"e0c3cc638002d3b08207a70f3e278ada73d4b7cb"}}]}]
BACKPORT-->

Co-authored-by: Lisa Cawley <lcawley@elastic.co>
This commit is contained in:
Kibana Machine 2024-05-01 20:43:08 -04:00 committed by GitHub
parent f4e2d37ed1
commit d3738cbe45
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 2 deletions

View file

@ -19,6 +19,7 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D
const meta = getDocLinksMeta({ kibanaBranch, buildFlavor });
const DOC_LINK_VERSION = meta.version;
const ECS_VERSION = meta.ecs_version;
const ELASTIC_WEBSITE_URL = meta.elasticWebsiteUrl;
const DOCS_WEBSITE_URL = meta.docsWebsiteUrl;
const ELASTIC_GITHUB = meta.elasticGithubUrl;
@ -786,7 +787,7 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D
pipelines: isServerless
? `${SERVERLESS_DOCS}ingest-pipelines`
: `${ELASTICSEARCH_DOCS}ingest.html`,
csvPipelines: `${ELASTIC_WEBSITE_URL}guide/en/ecs/${DOC_LINK_VERSION}/ecs-converting.html`,
csvPipelines: `${ELASTIC_WEBSITE_URL}guide/en/ecs/${ECS_VERSION}/ecs-converting.html`,
pipelineFailure: `${ELASTICSEARCH_DOCS}ingest.html#handling-pipeline-failures`,
processors: `${ELASTICSEARCH_DOCS}processors.html`,
remove: `${ELASTICSEARCH_DOCS}remove-processor.html`,
@ -840,7 +841,7 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D
scalingKubernetesResourcesAndLimits: `${FLEET_DOCS}scaling-on-kubernetes.html#_specifying_resources_and_limits_in_agent_manifests`,
},
ecs: {
guide: `${ELASTIC_WEBSITE_URL}guide/en/ecs/current/index.html`,
guide: `${ELASTIC_WEBSITE_URL}guide/en/ecs/${ECS_VERSION}/index.html`,
},
clients: {
/** Changes to these URLs must also be synched in src/plugins/custom_integrations/server/language_clients/index.ts */

View file

@ -19,6 +19,7 @@ export const getDocLinksMeta = ({
}: GetDocLinksMetaOptions): DocLinksMeta => {
return {
version: kibanaBranch === 'main' ? 'master' : kibanaBranch,
ecs_version: 'current',
elasticWebsiteUrl: 'https://www.elastic.co/',
elasticGithubUrl: 'https://github.com/elastic/',
docsWebsiteUrl: 'https://docs.elastic.co/',

View file

@ -11,6 +11,7 @@
*/
export interface DocLinksMeta {
version: string;
ecs_version: string;
elasticWebsiteUrl: string;
elasticGithubUrl: string;
docsWebsiteUrl: string;