-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into 191951_rbac_fixes
- Loading branch information
Showing
56 changed files
with
1,737 additions
and
117 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the "Elastic License | ||
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side | ||
* Public License v 1"; you may not use this file except in compliance with, at | ||
* your election, the "Elastic License 2.0", the "GNU Affero General Public | ||
* License v3.0 only", or the "Server Side Public License, v 1". | ||
*/ | ||
|
||
require('../src/setup_node_env'); | ||
require('@kbn/product-doc-artifact-builder').runScript(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
x-pack/packages/ai-infra/product-doc-artifact-builder/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# @kbn/product-doc-artifact-builder | ||
|
||
Script to build the knowledge base artifacts |
8 changes: 8 additions & 0 deletions
8
x-pack/packages/ai-infra/product-doc-artifact-builder/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
export { runScript } from './src/command'; |
12 changes: 12 additions & 0 deletions
12
x-pack/packages/ai-infra/product-doc-artifact-builder/jest.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
module.exports = { | ||
preset: '@kbn/test/jest_node', | ||
rootDir: '../../../..', | ||
roots: ['<rootDir>/x-pack/packages/ai-infra/product-doc-artifact-builder'], | ||
}; |
6 changes: 6 additions & 0 deletions
6
x-pack/packages/ai-infra/product-doc-artifact-builder/kibana.jsonc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"type": "shared-common", | ||
"id": "@kbn/product-doc-artifact-builder", | ||
"owner": "@elastic/appex-ai-infra", | ||
"devOnly": true | ||
} |
6 changes: 6 additions & 0 deletions
6
x-pack/packages/ai-infra/product-doc-artifact-builder/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"name": "@kbn/product-doc-artifact-builder", | ||
"private": true, | ||
"version": "1.0.0", | ||
"license": "Elastic License 2.0" | ||
} |
16 changes: 16 additions & 0 deletions
16
x-pack/packages/ai-infra/product-doc-artifact-builder/src/artifact/artifact_name.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
export const getArtifactName = ({ | ||
productName, | ||
productVersion, | ||
}: { | ||
productName: string; | ||
productVersion: string; | ||
}): string => { | ||
return `kibana-kb-${productName}-${productVersion}.zip`.toLowerCase(); | ||
}; |
26 changes: 26 additions & 0 deletions
26
x-pack/packages/ai-infra/product-doc-artifact-builder/src/artifact/manifest.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
export interface ArtifactManifest { | ||
formatVersion: string; | ||
productName: string; | ||
productVersion: string; | ||
} | ||
|
||
export const getArtifactManifest = ({ | ||
productName, | ||
stackVersion, | ||
}: { | ||
productName: string; | ||
stackVersion: string; | ||
}): ArtifactManifest => { | ||
return { | ||
formatVersion: '1.0.0', | ||
productName, | ||
productVersion: stackVersion, | ||
}; | ||
}; |
39 changes: 39 additions & 0 deletions
39
x-pack/packages/ai-infra/product-doc-artifact-builder/src/artifact/mappings.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import type { MappingTypeMapping } from '@elastic/elasticsearch/lib/api/types'; | ||
|
||
export const getArtifactMappings = (inferenceEndpoint: string): MappingTypeMapping => { | ||
return { | ||
dynamic: 'strict', | ||
properties: { | ||
content_title: { type: 'text' }, | ||
content_body: { | ||
type: 'semantic_text', | ||
inference_id: inferenceEndpoint, | ||
}, | ||
product_name: { type: 'keyword' }, | ||
root_type: { type: 'keyword' }, | ||
slug: { type: 'keyword' }, | ||
url: { type: 'keyword' }, | ||
version: { type: 'version' }, | ||
ai_subtitle: { | ||
type: 'semantic_text', | ||
inference_id: inferenceEndpoint, | ||
}, | ||
ai_summary: { | ||
type: 'semantic_text', | ||
inference_id: inferenceEndpoint, | ||
}, | ||
ai_questions_answered: { | ||
type: 'semantic_text', | ||
inference_id: inferenceEndpoint, | ||
}, | ||
ai_tags: { type: 'keyword' }, | ||
}, | ||
}; | ||
}; |
11 changes: 11 additions & 0 deletions
11
x-pack/packages/ai-infra/product-doc-artifact-builder/src/artifact/product_name.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
/** | ||
* The allowed product names, as found in the source's cluster | ||
*/ | ||
export const sourceProductNames = ['Kibana', 'Elasticsearch', 'Security', 'Observability']; |
Oops, something went wrong.