Skip to content

Commit

Permalink
Compatibility with opensearch 2.17.1 (#383)
Browse files Browse the repository at this point in the history
Signed-off-by: yenienserrano <[email protected]>
Signed-off-by: Álex Ruiz <[email protected]>
Signed-off-by: Ian Yenien Serrano <[email protected]>
Signed-off-by: JuanGarriuz <[email protected]>
Signed-off-by: Antonio <[email protected]>
Co-authored-by: Álex Ruiz <[email protected]>
Co-authored-by: Maximiliano Ibarra <[email protected]>
Co-authored-by: Nicolas Agustin Guevara Pihen <[email protected]>
Co-authored-by: Antonio <[email protected]>
Co-authored-by: Tostti <[email protected]>
Co-authored-by: Raul Del Pozo Moreno <[email protected]>
Co-authored-by: Luciano Gorza <[email protected]>
Co-authored-by: Federico Rodriguez <[email protected]>
Co-authored-by: Chantal Belén kelm <[email protected]>
Co-authored-by: JuanGarriuz <[email protected]>
Co-authored-by: JuanGarriuz <[email protected]>
  • Loading branch information
12 people authored Nov 7, 2024
1 parent 62cc032 commit da9a183
Show file tree
Hide file tree
Showing 212 changed files with 6,479 additions and 3,853 deletions.
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/compatibility_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Compatibility request
about: Suggest supporting a new version of OpenSearch
title: 'Compatibility with OpenSearch (version)'
labels: compatibility, level/task, type/research
assignees: ''

---

## Description
We need to ensure the UI compatibility with the next version of OpenSearch vX.X.
This update is still being discussed, but we need to be aware of potential issues.

For that, we need to:

- [ ] Review opensearch and opensearch-dashboard latest stable changelog.
- [ ] Identify improvements and potential impact on the UI.
- [ ] Create new tracking and development branches.
- [ ] Develop a testing environment to verify our components would work under this new build.


## Issues
- _List here the detected issues_
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/new_release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: New release
about: "[wazuh-team] Track the effort of the team to release a new version of Wazuh"
title: Support for Wazuh 4.x.x
labels: level/task, type/enhancement
assignees: ''

---

## Description

Example:
> Wazuh 4.3.8 will be released shortly. Our Wazuh Dashboard app need to support this new version. From our side, no changes will be included, so we only need to bump the version.

## Tasks

### Pre-release
- [ ] Add support for Wazuh 4.x.x (bump).
- [ ] Generate the required tags.
- [ ] Generate the packages.
- [ ] Test the packages, to verify they install, and the app works as expected.
- [ ] [Optional] Run Regression Testing (#issue)
- [ ] Generate draft releases.
- [ ] Notify the @wazuh/cicd and @wazuh/content teams that the release is good to go, from our side.

### Post-release
- [ ] Make draft releases final and public.
- [ ] Sync branches.

### Supported versions

Same as on [previous releases](https://github.com/wazuh/wazuh-dashboard/wiki/Compatibility)
78 changes: 45 additions & 33 deletions .github/workflows/build_and_test_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ name: Build and test
# trigger on every commit push and PR for all branches except feature branches and pushes for backport branches
on:
push:
branches: [ '**', '!feature/**', '!backport/**' ]
branches: ['**', '!feature/**', '!backport/**']
paths-ignore:
- '**/*.md'
- 'docs/**'
- '.lycheeignore'
- 'CODEOWNERS'
- 'changelogs/fragments/**'
pull_request:
branches: [ '**', '!feature/**' ]
branches: ['**', '!feature/**']
paths-ignore:
- '**/*.md'
- 'docs/**'
Expand All @@ -31,21 +31,21 @@ env:
TEST_OPENSEARCH_TRANSPORT_PORT: 9403
TEST_OPENSEARCH_PORT: 9400
OSD_SNAPSHOT_SKIP_VERIFY_CHECKSUM: true
NODE_OPTIONS: "--max-old-space-size=6144 --dns-result-order=ipv4first"
NODE_OPTIONS: '--max-old-space-size=6144 --dns-result-order=ipv4first'

jobs:
build-lint-test:
name: Build and Verify on ${{ matrix.name }} (ciGroup${{ matrix.group }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
os: [ubuntu-latest] #Removed 'windows-latest'
group: [1, 2, 3, 4]
include:
- os: ubuntu-latest
name: Linux
- os: windows-latest
name: Windows
# - os: windows-latest
# name: Windows
runs-on: ${{ matrix.os }}
steps:
- name: Configure git's autocrlf (Windows only)
Expand All @@ -59,7 +59,7 @@ jobs:
with:
minimum-size: 16GB
maximum-size: 64GB
disk-root: "C:"
disk-root: 'C:'

- name: Checkout code
uses: actions/checkout@v3
Expand Down Expand Up @@ -145,13 +145,13 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
group: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
os: [ubuntu-latest] #Removed 'windows-latest'
group: [1, 2, 4, 6, 7, 8, 9, 10, 11, 13]
include:
- os: ubuntu-latest
name: Linux
- os: windows-latest
name: Windows
# - os: windows-latest
# name: Windows
runs-on: ${{ matrix.os }}
steps:
- run: echo Running functional tests for ciGroup${{ matrix.group }}
Expand All @@ -167,7 +167,7 @@ jobs:
with:
minimum-size: 16GB
maximum-size: 64GB
disk-root: "C:"
disk-root: 'C:'

- name: Checkout code
uses: actions/checkout@v3
Expand Down Expand Up @@ -262,12 +262,12 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
os: [ubuntu-latest] #Removed 'windows-latest'
include:
- os: ubuntu-latest
name: Linux
- os: windows-latest
name: Windows
# - os: windows-latest
# name: Windows
runs-on: ${{ matrix.os }}
steps:
- run: echo Running plugin functional tests
Expand All @@ -283,7 +283,7 @@ jobs:
with:
minimum-size: 16GB
maximum-size: 64GB
disk-root: "C:"
disk-root: 'C:'

- name: Checkout code
uses: actions/checkout@v3
Expand Down Expand Up @@ -383,21 +383,21 @@ jobs:
ext: tar.gz
suffix: linux-arm64
script: build-platform --linux-arm --skip-os-packages
- os: macos-latest
name: macOS x64
ext: tar.gz
suffix: darwin-x64
script: build-platform --darwin --skip-os-packages
- os: macos-latest
name: macOS ARM64
ext: tar.gz
suffix: darwin-arm64
script: build-platform --darwin-arm --skip-os-packages
- os: windows-latest
name: Windows x64
ext: zip
suffix: windows-x64
script: build-platform --windows --skip-os-packages
# - os: macos-latest
# name: macOS x64
# ext: tar.gz
# suffix: darwin-x64
# script: build-platform --darwin --skip-os-packages
# - os: macos-latest
# name: macOS ARM64
# ext: tar.gz
# suffix: darwin-arm64
# script: build-platform --darwin-arm --skip-os-packages
# - os: windows-latest
# name: Windows x64
# ext: zip
# suffix: windows-x64
# script: build-platform --windows --skip-os-packages
runs-on: ${{ matrix.os }}
defaults:
run:
Expand All @@ -415,7 +415,7 @@ jobs:
with:
minimum-size: 16GB
maximum-size: 64GB
disk-root: "C:"
disk-root: 'C:'

- name: Checkout code
uses: actions/checkout@v3
Expand Down Expand Up @@ -492,7 +492,19 @@ jobs:
working-directory: ./artifacts
strategy:
matrix:
version: [osd-2.0.0, osd-2.1.0, osd-2.2.0, osd-2.3.0, osd-2.4.0, osd-2.5.0, osd-2.6.0, osd-2.7.0, osd-2.8.0, osd-2.9.0]
version:
[
osd-2.0.0,
osd-2.1.0,
osd-2.2.0,
osd-2.3.0,
osd-2.4.0,
osd-2.5.0,
osd-2.6.0,
osd-2.7.0,
osd-2.8.0,
osd-2.9.0,
]
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand Down
97 changes: 97 additions & 0 deletions .github/workflows/build_base.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# This is a basic workflow that is manually triggered

name: Build base

on:
workflow_call:
inputs:
CHECKOUT_TO: # This is the branch to checkout to. Defaults to 'master'
description: 'The branch/tag/commit to checkout to'
required: true
default: ''
type: string
ARCHITECTURE:
description: 'The architecture to build the package for'
required: true
default: 'amd64'
type: string

workflow_dispatch:
inputs:
CHECKOUT_TO: # This is the branch to checkout to. Defaults to 'master'
description: 'The branch/tag/commit to checkout to'
required: true
default: ''
ARCHITECTURE:
description: 'The architecture to build the package for'
required: true
default: 'amd64'
type: string

jobs:
build:
runs-on: ${{ (inputs.ARCHITECTURE == 'x86_64' || inputs.ARCHITECTURE == 'amd64') && 'ubuntu-latest' || 'wz-linux-arm64' }}
name: Build
defaults:
run:
working-directory: ./artifacts
strategy:
matrix:
DISTRIBUTION: [tar.gz]

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
repository: wazuh/wazuh-dashboard
path: ./artifacts
ref: ${{ inputs.CHECKOUT_TO }}

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: './artifacts/.nvmrc'
registry-url: 'https://registry.npmjs.org'

- name: Setup Yarn
run: |
npm uninstall -g yarn
npm i -g [email protected]
yarn config set network-timeout 1000000 -g
- name: Configure Yarn Cache
run: echo "YARN_CACHE_LOCATION=$(yarn cache dir)" >> $GITHUB_ENV

- name: Initialize Yarn Cache
uses: actions/cache@v3
with:
path: ${{ env.YARN_CACHE_LOCATION }}
key: yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
yarn-
- name: Get package version
run: |
echo "VERSION=$(yarn --silent pkg-version)" >> $GITHUB_ENV
echo "WZD_VERSION=$(yarn --silent wzd-version)" >> $GITHUB_ENV
echo "WZD_REVISION=$(yarn --silent wzd-revision)" >> $GITHUB_ENV
- name: Get artifact build name
run: |
echo "ARTIFACT_BUILD_NAME=wazuh-dashboard_${{ env.WZD_VERSION }}-${{ env.WZD_REVISION }}_${{ (inputs.ARCHITECTURE == 'x86_64' || inputs.ARCHITECTURE == 'amd64') && 'x64' || 'arm64' }}.${{ matrix.DISTRIBUTION }}" >> $GITHUB_ENV
- name: Run bootstrap
run: yarn osd bootstrap

- name: Build
run: yarn build-platform --${{(inputs.ARCHITECTURE == 'x86_64' || inputs.ARCHITECTURE == 'amd64') && 'linux' || 'linux-arm'}} --skip-os-packages --release

- name: Rename artifact
run: mv /home/runner/work/wazuh-dashboard/wazuh-dashboard/artifacts/target/opensearch-dashboards-${{ env.VERSION }}-linux-${{ (inputs.ARCHITECTURE == 'x86_64' || inputs.ARCHITECTURE == 'amd64') && 'x64' || 'arm64' }}.${{ matrix.DISTRIBUTION }} /home/runner/work/wazuh-dashboard/wazuh-dashboard/artifacts/target/${{ env.ARTIFACT_BUILD_NAME }}

- uses: actions/upload-artifact@v3
if: success()
with:
name: ${{ env.ARTIFACT_BUILD_NAME }}
path: ./artifacts/target/${{ env.ARTIFACT_BUILD_NAME }}
retention-days: 30
Loading

0 comments on commit da9a183

Please sign in to comment.