-
-
Notifications
You must be signed in to change notification settings - Fork 506
Upgrade Elasticsearch to 9.4.4 #2416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 9 commits
e16ca8c
7da5914
44efc54
aa3c59c
1e1e857
2558a12
d759315
74ab19f
1cfba76
9a73c3b
1726e1d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -83,6 +83,7 @@ jobs: | |
| timeout-minutes: 30 | ||
| outputs: | ||
| version: ${{ steps.version.outputs.version }} | ||
| elasticsearch_image_tag: ${{ steps.elasticsearch_image.outputs.tag }} | ||
| should_publish: ${{ (github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'dev-preview')) && secrets.DOCKER_USERNAME != '' && secrets.DOCKER_PASSWORD != '' }} | ||
| is_prod_deploy: ${{ startsWith(github.ref, 'refs/tags/v') && github.event_name != 'pull_request' }} | ||
| is_dev_deploy: ${{ (github.event_name == 'repository_dispatch' && github.event.action == 'preview') || (github.event_name == 'push' && github.ref == 'refs/heads/main') || (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'dev-preview')) }} | ||
|
|
@@ -129,9 +130,52 @@ jobs: | |
| echo "version=$version" >> $GITHUB_OUTPUT | ||
| echo "### $version" >> $GITHUB_STEP_SUMMARY | ||
|
|
||
| - name: Resolve Elasticsearch image | ||
| id: elasticsearch_image | ||
| env: | ||
| PR_BASE_SHA: ${{ github.event.pull_request.base.sha }} | ||
| PUSH_BEFORE_SHA: ${{ github.event.before }} | ||
| run: | | ||
| version=$(sed -n 's/.*elasticsearch:\([^ ]*\).*/\1/p' build/docker/elasticsearch/9.x/Dockerfile) | ||
| tag=$version | ||
| image_changed=false | ||
|
|
||
| if [[ "$GITHUB_EVENT_NAME" == "pull_request" ]] && | ||
| ! git diff --quiet "$PR_BASE_SHA"...HEAD -- build/docker/elasticsearch/9.x .github/workflows/elasticsearch-docker-9.yml; then | ||
| image_changed=true | ||
|
Comment on lines
+143
to
+145
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
For any pull request from a fork that changes the Elasticsearch Docker inputs, this branch selects the content-addressed candidate and waits for its manifest, but AGENTS.md reference: AGENTS.md:L85-L88 Useful? React with 👍 / 👎. |
||
| elif [[ "$GITHUB_EVENT_NAME" == "push" && "$GITHUB_REF" == "refs/heads/main" ]] && | ||
| ! git diff --quiet "$PUSH_BEFORE_SHA"..HEAD -- build/docker/elasticsearch/9.x .github/workflows/elasticsearch-docker-9.yml; then | ||
| image_changed=true | ||
| fi | ||
|
|
||
| if [[ "$image_changed" == "true" ]]; then | ||
| image_sha=$(sha256sum build/docker/elasticsearch/9.x/Dockerfile | cut -d " " -f 1) | ||
| tag="$version-sha256-$image_sha" | ||
|
ejsmith marked this conversation as resolved.
Outdated
|
||
| image="exceptionless/elasticsearch:$tag" | ||
|
|
||
| for attempt in {1..30}; do | ||
| if docker manifest inspect "$image" > /dev/null 2>&1; then | ||
| break | ||
| fi | ||
|
|
||
| if [[ "$attempt" -eq 30 ]]; then | ||
| echo "::error::Timed out waiting for $image to be published." | ||
| exit 1 | ||
| fi | ||
|
|
||
| sleep 10 | ||
| done | ||
| fi | ||
|
|
||
| echo "tag=$tag" >> "$GITHUB_OUTPUT" | ||
| echo "### Elasticsearch image: exceptionless/elasticsearch:$tag" >> "$GITHUB_STEP_SUMMARY" | ||
|
|
||
| test-api: | ||
| needs: version | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 30 | ||
| env: | ||
| Elasticsearch__ImageTag: ${{ needs.version.outputs.elasticsearch_image_tag }} | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
|
|
@@ -223,8 +267,11 @@ jobs: | |
| run: echo "npm run test:integration" | ||
|
|
||
| test-e2e: | ||
| needs: version | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 45 | ||
| env: | ||
| Elasticsearch__ImageTag: ${{ needs.version.outputs.elasticsearch_image_tag }} | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| name: Elasticsearch 9.x Docker Image CI | ||
|
|
||
| on: | ||
| push: | ||
| paths: | ||
| - "build/docker/elasticsearch/9.x/**" | ||
| - ".github/workflows/elasticsearch-docker-9.yml" | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| if: startsWith(github.ref, 'refs/tags/v') != true | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v7 | ||
| - name: Setup .NET Core | ||
| uses: actions/setup-dotnet@v5 | ||
| with: | ||
| dotnet-version: 10.0.301 | ||
| - name: Build Reason | ||
| env: | ||
| GITHUB_EVENT: ${{ toJson(github) }} | ||
| run: "echo ref: ${{github.ref}} event: ${{github.event_name}}" | ||
| - name: Build Version | ||
| run: | | ||
| dotnet tool install --global minver-cli --version 7.0.0 | ||
| version=$(minver --tag-prefix v) | ||
| echo "MINVERVERSIONOVERRIDE=$version" >> $GITHUB_ENV | ||
| echo "VERSION=$version" >> $GITHUB_ENV | ||
| echo "### Version: $version" >> $GITHUB_STEP_SUMMARY | ||
| - name: Set up QEMU | ||
| uses: docker/setup-qemu-action@v4 | ||
| - name: Login to DockerHub | ||
| uses: docker/login-action@v4 | ||
| with: | ||
| username: ${{ secrets.DOCKER_USERNAME }} | ||
| password: ${{ secrets.DOCKER_PASSWORD }} | ||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v4 | ||
| with: | ||
| platforms: linux/amd64,linux/arm64 | ||
| - name: Build custom Elasticsearch 9.x docker image | ||
| working-directory: build/docker/elasticsearch/9.x | ||
| env: | ||
| DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} | ||
| run: | | ||
| VERSION=$(sed -n 's/.*elasticsearch:\([^ ]*\).*/\1/p' Dockerfile) | ||
| IMAGE_SHA=$(sha256sum Dockerfile | cut -d " " -f 1) | ||
| TAGS=(--tag "exceptionless/elasticsearch:$VERSION-sha256-$IMAGE_SHA") | ||
| if [[ "$GITHUB_REF" == "refs/heads/$DEFAULT_BRANCH" ]]; then | ||
| TAGS+=(--tag "exceptionless/elasticsearch:$VERSION" --tag "exceptionless/elasticsearch:latest") | ||
| fi | ||
| docker buildx build --platform linux/amd64,linux/arm64 --output "type=image,push=true" --file ./Dockerfile . "${TAGS[@]}" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| # https://www.docker.elastic.co/ | ||
| FROM docker.elastic.co/elasticsearch/elasticsearch:9.4.4 | ||
|
|
||
| RUN elasticsearch-plugin install -b mapper-size |
Uh oh!
There was an error while loading. Please reload this page.