Skip to content

Commit d84c676

Browse files
Mpdreamzcotti
andauthored
Reapply #1708 Add ElasticsearchGateway and UI adjustments" (#1731)
* Reapply "Add ElasticsearchGateway and UI adjustments (#1708)" (#1730) This reverts commit b97d87d. * move to later runtime deps image * Run container to validate * update docker name --------- Co-authored-by: Felipe Cotti <[email protected]>
1 parent 3b710c3 commit d84c676

File tree

21 files changed

+676
-148
lines changed

21 files changed

+676
-148
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,17 @@ jobs:
9494
run: dotnet run --project build -c release -- unit-test
9595

9696
- name: Publish AOT
97+
if: ${{ matrix.os != 'ubuntu-latest' }} # publish containers already validates AOT build
9798
run: dotnet run --project build -c release -- publishbinaries
99+
100+
- name: Publish Containers
101+
if: ${{ matrix.os == 'ubuntu-latest' }}
102+
run: dotnet run --project build -c release -- publishcontainers
103+
104+
- name: Run Container
105+
if: ${{ matrix.os == 'ubuntu-latest' }}
106+
run: docker run elastic/docs-builder:ci-${{ github.event.pull_request.number }} --help
107+
98108

99109
integration:
100110
runs-on: docs-builder-latest-16

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
password: ${{ secrets.GITHUB_TOKEN }}
6868

6969
- name: Publish Containers
70-
run: ./build.sh publishcontainers\
70+
run: ./build.sh publishcontainers
7171

7272
build-lambda:
7373
needs:

Directory.Packages.props

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@
2323
<PackageVersion Include="AWSSDK.SQS" Version="4.0.0.1" />
2424
<PackageVersion Include="AWSSDK.S3" Version="4.0.0.1" />
2525
<PackageVersion Include="Elastic.Aspire.Hosting.Elasticsearch" Version="9.3.0" />
26+
<PackageVersion Include="Elastic.Clients.Elasticsearch" Version="9.1.4" />
2627
<PackageVersion Include="FakeItEasy" Version="8.3.0" />
27-
<PackageVersion Include="Elastic.Ingest.Elasticsearch" Version="0.11.3" />
28+
<PackageVersion Include="Elastic.Ingest.Elasticsearch" Version="0.14.0" />
2829
<PackageVersion Include="InMemoryLogger" Version="1.0.66" />
2930
<PackageVersion Include="MartinCostello.Logging.XUnit.v3" Version="0.6.0" />
3031
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.4" />

build/Targets.fs

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -77,32 +77,40 @@ let private publishZip _ =
7777
let private publishContainers _ =
7878

7979
let createImage project =
80+
let ci = Environment.environVarOrNone "GITHUB_ACTIONS"
81+
let pr =
82+
match Environment.environVarOrNone "GITHUB_REF_NAME" with
83+
| None -> None
84+
| Some s when s.EndsWith "/merge" -> Some (s.Split('/') |> Seq.head)
85+
| _ -> None
8086
let imageTag =
8187
match project with
82-
| "docs-builder" -> "jammy-chiseled-aot"
83-
| _ -> "jammy-chiseled-aot"
88+
| _ -> "9.0-noble-chiseled-aot"
8489
let labels =
8590
let exitCode = exec {
8691
validExitCode (fun _ -> true)
8792
exit_code_of "git" "describe" "--tags" "--exact-match" "HEAD"
8893
}
89-
match exitCode with | 0 -> "edge;latest" | _ -> "edge"
94+
match (exitCode, pr) with
95+
| 0, _ -> "edge;latest"
96+
| _, None -> "edge"
97+
| _, Some pr -> $"ci-%s{pr}"
9098
let args =
9199
["publish"; $"src/tooling/%s{project}/%s{project}.csproj"]
92100
@ [
93101
"/t:PublishContainer";
94102
"-p"; "DebugType=none";
95-
"-p"; $"ContainerBaseImage=mcr.microsoft.com/dotnet/nightly/runtime-deps:8.0-%s{imageTag}";
103+
"-p"; $"ContainerBaseImage=mcr.microsoft.com/dotnet/nightly/runtime-deps:%s{imageTag}";
96104
"-p"; $"ContainerImageTags=\"%s{labels};%s{Software.Version.Normalize()}\""
97105
"-p"; $"ContainerRepository=elastic/%s{project}"
98106
]
99107
let registry =
100-
match Environment.environVarOrNone "GITHUB_ACTIONS" with
101-
| None -> []
102-
| Some _ -> [
103-
"-p"; "ContainerRegistry=ghcr.io"
104-
"-p"; "ContainerUser=1001:1001";
105-
]
108+
match (ci, pr) with
109+
| Some _, None -> [
110+
"-p"; "ContainerRegistry=ghcr.io"
111+
"-p"; "ContainerUser=1001:1001";
112+
]
113+
| _, _ -> []
106114
exec { run "dotnet" (args @ registry) }
107115
createImage "docs-builder"
108116
createImage "docs-assembler"

src/Elastic.Documentation.Site/Assets/web-components/SearchOrAskAi/AskAi/AskAiSuggestions.tsx

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
import { useSearchActions, useSearchTerm } from '../search.store'
2-
import { EuiButton, EuiSpacer, EuiText, useEuiTheme } from '@elastic/eui'
2+
import {
3+
EuiButton,
4+
EuiIcon,
5+
EuiSpacer,
6+
EuiText,
7+
useEuiTheme,
8+
} from '@elastic/eui'
39
import { css } from '@emotion/react'
410
import * as React from 'react'
511

@@ -26,7 +32,16 @@ export const AskAiSuggestions = (props: Props) => {
2632
`
2733
return (
2834
<>
29-
<EuiText size="xs">Ask Elastic Docs AI Assistant</EuiText>
35+
<div
36+
css={css`
37+
display: flex;
38+
gap: ${euiTheme.size.s};
39+
align-items: center;
40+
`}
41+
>
42+
<EuiIcon type="sparkles" color="subdued" size="s" />
43+
<EuiText size="xs">Ask Elastic Docs AI Assistant</EuiText>
44+
</div>
3045
<EuiSpacer size="s" />
3146
{searchTerm && (
3247
<EuiButton

0 commit comments

Comments
 (0)