Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 48 additions & 4 deletions .github/workflows/4_builderpackage_dashboard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ on:
description: 'Branch/tag/commit of the wazuh-dashboard-plugins repository to build the main plugins'
required: true
default: '4.14.0'
reference_ml_commons_plugin:
type: string
description: 'Branch/tag/commit of the wazuh-dashboard-ml-commons repository to build the ML Commons plugin'
required: true
default: '4.14.0'
is_stage:
type: boolean
description: 'Set production nomenclature'
Expand Down Expand Up @@ -92,6 +97,10 @@ on:
type: string
required: true
default: '4.14.0'
reference_ml_commons_plugin:
type: string
required: true
default: '4.14.0'
is_stage:
type: boolean
required: true
Expand Down Expand Up @@ -120,8 +129,10 @@ jobs:
COMMIT_SHA: ${{ steps.setup-variables.outputs.COMMIT_SHA }}
PLUGINS_SHA: ${{ steps.setup-variables.outputs.PLUGINS_SHA }}
SECURITY_SHA: ${{ steps.setup-variables.outputs.SECURITY_SHA }}
ML_COMMONS_SHA: ${{ steps.setup-variables.outputs.ML_COMMONS_SHA }}
PRODUCTION: ${{ steps.setup-variables.outputs.PRODUCTION }}
WAZUH_DASHBOARD_SLIM: ${{ steps.setup-variables.outputs.WAZUH_DASHBOARD_SLIM }}
WAZUH_ML_COMMONS_PLUGIN: ${{ steps.setup-variables.outputs.WAZUH_ML_COMMONS_PLUGIN }}
WAZUH_SECURITY_PLUGIN: ${{ steps.setup-variables.outputs.WAZUH_SECURITY_PLUGIN }}
WAZUH_PLUGINS_WAZUH: ${{ steps.setup-variables.outputs.WAZUH_PLUGINS_WAZUH }}
WAZUH_PLUGINS_CORE: ${{ steps.setup-variables.outputs.WAZUH_PLUGINS_CORE }}
Expand Down Expand Up @@ -150,6 +161,12 @@ jobs:
git clone -b ${{ inputs.reference_security_plugins }} --single-branch https://github.com/wazuh/wazuh-security-dashboards-plugin.git wzsp
cd wzsp
echo "WAZUH_SECURITY_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Get SHA of wazuh-dashboard-ml-commons
id: get-ml-commons-sha
run: |
git clone -b ${{ inputs.reference_ml_commons_plugin }} --single-branch https://github.com/wazuh/wazuh-dashboard-ml-commons.git wzml
cd wzml
echo "ML_COMMONS_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT

- name: Setup variables
id: setup-variables
Expand All @@ -175,27 +192,29 @@ jobs:
COMMIT_SHA=$(git rev-parse --short HEAD)
PLUGINS_SHA=${{steps.get-plugins-sha.outputs.WAZUH_PLUGINS_SHA}}
SECURITY_SHA=${{steps.get-security-sha.outputs.WAZUH_SECURITY_SHA}}
ML_COMMONS_SHA=${{steps.get-ml-commons-sha.outputs.ML_COMMONS_SHA}}
if [ "${{ inputs.is_stage }}" = "true" ]; then
PRODUCTION=--production
else
PRODUCTION=""
fi
WAZUH_DASHBOARD_SLIM=wazuh-dashboard_${VERSION}-${REVISION}_${{ (inputs.ARCHITECTURE == 'x86_64' || inputs.ARCHITECTURE == 'amd64') && 'x64' || 'arm64' }}.tar.gz
WAZUH_SECURITY_PLUGIN=wazuh-security-dashboards-plugin_${VERSION}-${REVISION}_$(echo ${{ inputs.reference_security_plugins }} | sed 's/\//-/g').zip
WAZUH_ML_COMMONS_PLUGIN=ml-commons-dashboards_${VERSION}-${REVISION}_$(echo ${{ inputs.reference_ml_commons_plugin }} | sed 's/\//-/g').zip
WAZUH_PLUGINS_WAZUH=wazuh-dashboard-plugins_wazuh_${VERSION}-${REVISION}_$(echo ${{ inputs.reference_wazuh_plugins }} | sed 's/\//-/g').zip
WAZUH_PLUGINS_CORE=wazuh-dashboard-plugins_wazuh-core_${VERSION}-${REVISION}_$(echo ${{ inputs.reference_wazuh_plugins }} | sed 's/\//-/g').zip
WAZUH_PLUGINS_CHECK_UPDATES=wazuh-dashboard-plugins_wazuh-check-updates_${VERSION}-${REVISION}_$(echo ${{ inputs.reference_wazuh_plugins }} | sed 's/\//-/g').zip
if [ "${{ inputs.system }}" = "deb" ]; then
if [ "${{ inputs.is_stage }}" = "true" ]; then
PACKAGE_NAME=wazuh-dashboard_${VERSION}-${{ inputs.revision }}_${{ inputs.architecture }}.deb
else
PACKAGE_NAME=wazuh-dashboard_${VERSION}-${{ inputs.revision }}_${{ inputs.architecture }}_${COMMIT_SHA}-${PLUGINS_SHA}-${SECURITY_SHA}.deb
PACKAGE_NAME=wazuh-dashboard_${VERSION}-${{ inputs.revision }}_${{ inputs.architecture }}_${COMMIT_SHA}-${PLUGINS_SHA}-${SECURITY_SHA}-${ML_COMMONS_SHA}.deb
fi
else
if [ "${{ inputs.is_stage }}" = "true" ]; then
PACKAGE_NAME=wazuh-dashboard-${VERSION}-${{ inputs.revision }}.${{ inputs.architecture }}.rpm
else
PACKAGE_NAME=wazuh-dashboard_${VERSION}-${{ inputs.revision }}_${{ inputs.architecture }}_${COMMIT_SHA}-${PLUGINS_SHA}-${SECURITY_SHA}.rpm
PACKAGE_NAME=wazuh-dashboard_${VERSION}-${{ inputs.revision }}_${{ inputs.architecture }}_${COMMIT_SHA}-${PLUGINS_SHA}-${SECURITY_SHA}-${ML_COMMONS_SHA}.rpm
fi
fi
if [[ "${{ inputs.architecture }}" == "x86_64" || "${{ inputs.architecture }}" == "amd64" ]]; then
Expand All @@ -210,8 +229,10 @@ jobs:
echo "COMMIT_SHA=$COMMIT_SHA" >> $GITHUB_OUTPUT
echo "PLUGINS_SHA=$PLUGINS_SHA" >> $GITHUB_OUTPUT
echo "SECURITY_SHA=$SECURITY_SHA" >> $GITHUB_OUTPUT
echo "ML_COMMONS_SHA=$ML_COMMONS_SHA" >> $GITHUB_OUTPUT
echo "PRODUCTION=$PRODUCTION" >> $GITHUB_OUTPUT
echo "WAZUH_DASHBOARD_SLIM=$WAZUH_DASHBOARD_SLIM" >> $GITHUB_OUTPUT
echo "WAZUH_ML_COMMONS_PLUGIN=$WAZUH_ML_COMMONS_PLUGIN" >> $GITHUB_OUTPUT
echo "WAZUH_SECURITY_PLUGIN=$WAZUH_SECURITY_PLUGIN" >> $GITHUB_OUTPUT
echo "WAZUH_PLUGINS_WAZUH=$WAZUH_PLUGINS_WAZUH" >> $GITHUB_OUTPUT
echo "WAZUH_PLUGINS_CORE=$WAZUH_PLUGINS_CORE" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -268,8 +289,24 @@ jobs:
with:
reference: ${{ inputs.reference_security_plugins }}

build-ml-commons-plugin:
needs: [validate-job]
name: Build ML Commons plugin
permissions:
pull-requests: write
uses: wazuh/wazuh-dashboard-ml-commons/.github/workflows/[email protected]
with:
reference: ${{ inputs.reference_ml_commons_plugin }}

build-package:
needs: [setup-variables, build-main-plugins, build-base, build-security-plugin]
needs:
[
setup-variables,
build-main-plugins,
build-base,
build-security-plugin,
build-ml-commons-plugin,
]
runs-on: ${{ (inputs.architecture == 'arm64' || inputs.architecture == 'aarch64') && 'wz-linux-arm64' || 'ubuntu-22.04' }}
name: Generate packages
steps:
Expand All @@ -293,6 +330,11 @@ jobs:
with:
name: ${{ needs.setup-variables.outputs.WAZUH_SECURITY_PLUGIN }}
path: ${{ needs.setup-variables.outputs.CURRENT_DIR }}/artifacts/security-plugin
- name: Download ml commons plugin artifact
uses: actions/download-artifact@v4
with:
name: ${{ needs.setup-variables.outputs.WAZUH_ML_COMMONS_PLUGIN }}
path: ${{ needs.setup-variables.outputs.CURRENT_DIR }}/artifacts/ml-commons-plugin

- name: Download main plugin's artifact
uses: actions/download-artifact@v4
Expand All @@ -314,6 +356,7 @@ jobs:
run: |
zip -r -j ${{ needs.setup-variables.outputs.CURRENT_DIR }}/artifacts/wazuh-package.zip ${{ needs.setup-variables.outputs.CURRENT_DIR }}/artifacts/plugins
zip -r -j ${{ needs.setup-variables.outputs.CURRENT_DIR }}/artifacts/security-package.zip ${{ needs.setup-variables.outputs.CURRENT_DIR }}/artifacts/security-plugin
zip -r -j ${{ needs.setup-variables.outputs.CURRENT_DIR }}/artifacts/ml-commons-package.zip ${{ needs.setup-variables.outputs.CURRENT_DIR }}/artifacts/ml-commons-plugin
zip -r -j ${{ needs.setup-variables.outputs.CURRENT_DIR }}/artifacts/dashboard-package.zip ${{ needs.setup-variables.outputs.CURRENT_DIR }}/artifacts/dashboard/${{ needs.setup-variables.outputs.WAZUH_DASHBOARD_SLIM }}

- name: Build package
Expand All @@ -323,8 +366,9 @@ jobs:
-r ${{ inputs.revision }} ${{ needs.setup-variables.outputs.ARCHITECTURE_FLAG }} \
-a file://${{needs.setup-variables.outputs.CURRENT_DIR}}/artifacts/wazuh-package.zip \
-s file://${{needs.setup-variables.outputs.CURRENT_DIR}}/artifacts/security-package.zip \
-m file://${{needs.setup-variables.outputs.CURRENT_DIR}}/artifacts/ml-commons-package.zip \
-b file://${{needs.setup-variables.outputs.CURRENT_DIR}}/artifacts/dashboard-package.zip \
--commit-sha ${{needs.setup-variables.outputs.COMMIT_SHA}}-${{needs.setup-variables.outputs.PLUGINS_SHA}}-${{needs.setup-variables.outputs.SECURITY_SHA}} \
--commit-sha ${{needs.setup-variables.outputs.COMMIT_SHA}}-${{needs.setup-variables.outputs.PLUGINS_SHA}}-${{needs.setup-variables.outputs.SECURITY_SHA}}-${{needs.setup-variables.outputs.ML_COMMONS_SHA}} \
--${{ inputs.system }} ${{ needs.setup-variables.outputs.PRODUCTION }} --debug

- name: Upload artifact
Expand Down
41 changes: 39 additions & 2 deletions .github/workflows/build_wazuh_dashboard_with_plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ on:
description: 'Branch/tag/commit of the wazuh-dashboard-plugins repository to build the main plugins'
required: true
default: 'main'
reference_ml_commons_plugin:
type: string
description: 'Branch/tag/commit of the wazuh-dashboard-ml-commons repository to build the ML Commons plugin'
required: true
default: 'main'
is_stage:
type: boolean
description: 'Set production nomenclature'
Expand Down Expand Up @@ -74,6 +79,10 @@ on:
type: string
required: true
default: 'main'
reference_ml_commons_plugin:
type: string
required: true
default: 'main'
is_stage:
type: boolean
required: true
Expand Down Expand Up @@ -102,8 +111,10 @@ jobs:
COMMIT_SHA: ${{ steps.setup-variables.outputs.COMMIT_SHA }}
PLUGINS_SHA: ${{ steps.setup-variables.outputs.PLUGINS_SHA }}
SECURITY_SHA: ${{ steps.setup-variables.outputs.SECURITY_SHA }}
ML_COMMONS_SHA: ${{ steps.setup-variables.outputs.ML_COMMONS_SHA }}
PRODUCTION: ${{ steps.setup-variables.outputs.PRODUCTION }}
WAZUH_DASHBOARD_SLIM: ${{ steps.setup-variables.outputs.WAZUH_DASHBOARD_SLIM }}
WAZUH_ML_COMMONS_PLUGIN: ${{ steps.setup-variables.outputs.WAZUH_ML_COMMONS_PLUGIN }}
WAZUH_SECURITY_PLUGIN: ${{ steps.setup-variables.outputs.WAZUH_SECURITY_PLUGIN }}
WAZUH_PLUGINS_WAZUH: ${{ steps.setup-variables.outputs.WAZUH_PLUGINS_WAZUH }}
WAZUH_PLUGINS_CORE: ${{ steps.setup-variables.outputs.WAZUH_PLUGINS_CORE }}
Expand Down Expand Up @@ -132,6 +143,12 @@ jobs:
git clone -b ${{ inputs.reference_security_plugins }} --single-branch https://github.com/wazuh/wazuh-security-dashboards-plugin.git wzsp
cd wzsp
echo "WAZUH_SECURITY_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Get SHA of wazuh-dashboard-ml-commons
id: get-ml-commons-sha
run: |
git clone -b ${{ inputs.reference_ml_commons_plugin }} --single-branch https://github.com/wazuh/wazuh-dashboard-ml-commons.git wzml
cd wzml
echo "ML_COMMONS_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT

- name: Setup variables
id: setup-variables
Expand All @@ -157,13 +174,15 @@ jobs:
COMMIT_SHA=$(git rev-parse --short HEAD)
PLUGINS_SHA=${{steps.get-plugins-sha.outputs.WAZUH_PLUGINS_SHA}}
SECURITY_SHA=${{steps.get-security-sha.outputs.WAZUH_SECURITY_SHA}}
ML_COMMONS_SHA=${{steps.get-ml-commons-sha.outputs.ML_COMMONS_SHA}}
if [ "${{ inputs.is_stage }}" = "true" ]; then
PRODUCTION=--production
else
PRODUCTION=""
fi
WAZUH_DASHBOARD_SLIM=wazuh-dashboard_${VERSION}-${REVISION}_${{ (inputs.ARCHITECTURE == 'x86_64' || inputs.ARCHITECTURE == 'amd64') && 'x64' || 'arm64' }}.tar.gz
WAZUH_SECURITY_PLUGIN=wazuh-security-dashboards-plugin_${VERSION}-${REVISION}_$(echo ${{ inputs.reference_security_plugins }} | sed 's/\//-/g').zip
WAZUH_ML_COMMONS_PLUGIN=wazuh-ml-commons-plugin_${VERSION}-${REVISION}_$(echo ${{ inputs.reference_ml_commons_plugin }} | sed 's/\//-/g').zip
WAZUH_PLUGINS_WAZUH=wazuh-dashboard-plugins_wazuh_${VERSION}-${REVISION}_$(echo ${{ inputs.reference_wazuh_plugins }} | sed 's/\//-/g').zip
WAZUH_PLUGINS_CORE=wazuh-dashboard-plugins_wazuh-core_${VERSION}-${REVISION}_$(echo ${{ inputs.reference_wazuh_plugins }} | sed 's/\//-/g').zip
WAZUH_PLUGINS_CHECK_UPDATES=wazuh-dashboard-plugins_wazuh-check-updates_${VERSION}-${REVISION}_$(echo ${{ inputs.reference_wazuh_plugins }} | sed 's/\//-/g').zip
Expand Down Expand Up @@ -192,8 +211,10 @@ jobs:
echo "COMMIT_SHA=$COMMIT_SHA" >> $GITHUB_OUTPUT
echo "PLUGINS_SHA=$PLUGINS_SHA" >> $GITHUB_OUTPUT
echo "SECURITY_SHA=$SECURITY_SHA" >> $GITHUB_OUTPUT
echo "ML_COMMONS_SHA=$ML_COMMONS_SHA" >> $GITHUB_OUTPUT
echo "PRODUCTION=$PRODUCTION" >> $GITHUB_OUTPUT
echo "WAZUH_DASHBOARD_SLIM=$WAZUH_DASHBOARD_SLIM" >> $GITHUB_OUTPUT
echo "WAZUH_ML_COMMONS_PLUGIN=$WAZUH_ML_COMMONS_PLUGIN" >> $GITHUB_OUTPUT
echo "WAZUH_SECURITY_PLUGIN=$WAZUH_SECURITY_PLUGIN" >> $GITHUB_OUTPUT
echo "WAZUH_PLUGINS_WAZUH=$WAZUH_PLUGINS_WAZUH" >> $GITHUB_OUTPUT
echo "WAZUH_PLUGINS_CORE=$WAZUH_PLUGINS_CORE" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -250,8 +271,17 @@ jobs:
with:
reference: ${{ inputs.reference_security_plugins }}

build-ml-commons-plugin:
needs: [validate-job]
name: Build ML Commons plugin
permissions:
pull-requests: write
uses: wazuh/wazuh-dashboard-ml-commons/.github/workflows/[email protected]
with:
reference: ${{ inputs.reference_ml_commons_plugin }}

build-package:
needs: [setup-variables, build-main-plugins, build-base, build-security-plugin]
needs: [setup-variables, build-main-plugins, build-base, build-security-plugin, build-ml-commons-plugin]
runs-on: ${{ (inputs.architecture == 'arm64' || inputs.architecture == 'aarch64') && 'wz-linux-arm64' || 'ubuntu-22.04' }}
name: Generate packages
steps:
Expand All @@ -275,6 +305,11 @@ jobs:
with:
name: ${{ needs.setup-variables.outputs.WAZUH_SECURITY_PLUGIN }}
path: ${{ needs.setup-variables.outputs.CURRENT_DIR }}/artifacts/security-plugin
- name: Download ml commons plugin artifact
uses: actions/download-artifact@v4
with:
name: ${{ needs.setup-variables.outputs.WAZUH_ML_COMMONS_PLUGIN }}
path: ${{ needs.setup-variables.outputs.CURRENT_DIR }}/artifacts/ml-commons-plugin

- name: Download main plugin's artifact
uses: actions/download-artifact@v4
Expand All @@ -296,6 +331,7 @@ jobs:
run: |
zip -r -j ${{ needs.setup-variables.outputs.CURRENT_DIR }}/artifacts/wazuh-package.zip ${{ needs.setup-variables.outputs.CURRENT_DIR }}/artifacts/plugins
zip -r -j ${{ needs.setup-variables.outputs.CURRENT_DIR }}/artifacts/security-package.zip ${{ needs.setup-variables.outputs.CURRENT_DIR }}/artifacts/security-plugin
zip -r -j ${{ needs.setup-variables.outputs.CURRENT_DIR }}/artifacts/ml-commons-package.zip ${{ needs.setup-variables.outputs.CURRENT_DIR }}/artifacts/ml-commons-plugin
zip -r -j ${{ needs.setup-variables.outputs.CURRENT_DIR }}/artifacts/dashboard-package.zip ${{ needs.setup-variables.outputs.CURRENT_DIR }}/artifacts/dashboard/${{ needs.setup-variables.outputs.WAZUH_DASHBOARD_SLIM }}

- name: Build package
Expand All @@ -305,8 +341,9 @@ jobs:
-r ${{ inputs.revision }} ${{ needs.setup-variables.outputs.ARCHITECTURE_FLAG }} \
-a file://${{needs.setup-variables.outputs.CURRENT_DIR}}/artifacts/wazuh-package.zip \
-s file://${{needs.setup-variables.outputs.CURRENT_DIR}}/artifacts/security-package.zip \
-ml file://${{needs.setup-variables.outputs.CURRENT_DIR}}/artifacts/ml-commons-package.zip \
-b file://${{needs.setup-variables.outputs.CURRENT_DIR}}/artifacts/dashboard-package.zip \
--commit-sha ${{needs.setup-variables.outputs.COMMIT_SHA}}-${{needs.setup-variables.outputs.PLUGINS_SHA}}-${{needs.setup-variables.outputs.SECURITY_SHA}} \
--commit-sha ${{needs.setup-variables.outputs.COMMIT_SHA}}-${{needs.setup-variables.outputs.PLUGINS_SHA}}-${{needs.setup-variables.outputs.SECURITY_SHA}}-${{needs.setup-variables.outputs.ML_COMMONS_SHA}} \
--${{ inputs.system }} ${{ needs.setup-variables.outputs.PRODUCTION }} --debug

- name: Upload artifact
Expand Down
2 changes: 2 additions & 0 deletions dev-tools/build-packages/base-packages-to-base/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ The inputs are the following:
- `-a`, `--app`: Set the `wazuh-dashboard-plugins` branch.
- `-b`, `--base`: Set the `wazuh-dashboard` branch.
- `-s`, `--security`: Set the `wazuh-security-dashboards-plugin` branch.
- `-ml`, `--ml`: Set the `wazuh-dashboards-ml-commons` branch.
- `--node-version`: [Optional] Set the node version.
- `--arm`: [Optional] Build for arm64 instead of x64.

Expand All @@ -30,6 +31,7 @@ bash run-docker-compose.sh \
--app 4.14.0 \
--base 4.14.0 \
--security 4.14.0 \
--ml 4.14.0 \
--arm \
--node-version 18.19.0
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# --build-arg NODE_VERSION=18.19.0 \
# --build-arg WAZUH_DASHBOARD_BRANCH=4.14.0 \
# --build-arg WAZUH_DASHBOARD_SECURITY_BRANCH=4.14.0 \
# --build-arg WAZUH_DASHBOARD_ML_COMMONS_BRANCH=4.14.0 \
# --build-arg WAZUH_DASHBOARD_PLUGINS_BRANCH=4.14.0 \
# --build-arg ARCHITECTURE=arm \
# -t wazuh-packages-to-base:4.14.0 \
Expand All @@ -13,6 +14,7 @@ FROM node:${NODE_VERSION} AS base
ARG ARCHITECTURE='amd'
ARG WAZUH_DASHBOARD_BRANCH
ARG WAZUH_DASHBOARD_SECURITY_BRANCH
ARG WAZUH_DASHBOARD_ML_COMMONS_BRANCH
ARG WAZUH_DASHBOARD_PLUGINS_BRANCH
ENV OPENSEARCH_DASHBOARDS_VERSION=2.19.3
ENV ENV_ARCHITECTURE=${ARCHITECTURE}
Expand All @@ -22,6 +24,7 @@ USER node
ADD ./clone-plugins.sh /home/node/clone-plugins.sh
ADD ./repositories/wazuh-dashboard.sh /home/node/repositories/wazuh-dashboard.sh
ADD ./repositories/plugins/wazuh-security-dashboards-plugin.sh /home/node/repositories/plugins/wazuh-security-dashboards-plugin.sh
ADD ./repositories/plugins/wazuh-dashboard-ml-commons.sh /home/node/repositories/plugins/wazuh-dashboard-ml-commons.sh
ADD ./repositories/plugins/wazuh-dashboard-plugins.sh /home/node/repositories/plugins/wazuh-dashboard-plugins.sh
RUN bash /home/node/clone-plugins.sh

Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
services:
base:
image: base-${WAZUH_DASHBOARD_BRANCH}-${WAZUH_SECURITY_PLUGIN_BRANCH}-${WAZUH_DASHBOARD_PLUGINS_BRANCH}-${ARCHITECTURE}
image: base-${WAZUH_DASHBOARD_BRANCH}-${WAZUH_SECURITY_PLUGIN_BRANCH}-${WAZUH_DASHBOARD_PLUGINS_BRANCH}-${WAZUH_DASHBOARD_ML_COMMONS_BRANCH}-${ARCHITECTURE}
build:
context: .
dockerfile: base-packages.Dockerfile
args:
NODE_VERSION: ${NODE_VERSION}
WAZUH_DASHBOARD_BRANCH: ${WAZUH_DASHBOARD_BRANCH}
WAZUH_DASHBOARD_SECURITY_BRANCH: ${WAZUH_SECURITY_PLUGIN_BRANCH}
WAZUH_DASHBOARD_ML_COMMONS_BRANCH: ${WAZUH_DASHBOARD_ML_COMMONS_BRANCH}
WAZUH_DASHBOARD_PLUGINS_BRANCH: ${WAZUH_DASHBOARD_PLUGINS_BRANCH}
ARCHITECTURE: ${ARCHITECTURE}
container_name: base-${WAZUH_DASHBOARD_BRANCH}-${WAZUH_SECURITY_PLUGIN_BRANCH}-${WAZUH_DASHBOARD_PLUGINS_BRANCH}-${ARCHITECTURE}
container_name: base-${WAZUH_DASHBOARD_BRANCH}-${WAZUH_SECURITY_PLUGIN_BRANCH}-${WAZUH_DASHBOARD_PLUGINS_BRANCH}-${WAZUH_DASHBOARD_ML_COMMONS_BRANCH}-${ARCHITECTURE}
environment:
OPENSEARCH_DASHBOARDS_VERSION: 2.19.3
volumes:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Clone the Wazuh ML Commons plugin
cd /home/node/app/plugins
git clone --depth 1 --branch ${WAZUH_DASHBOARD_ML_COMMONS_BRANCH} https://github.com/wazuh/wazuh-dashboard-ml-commons.git
cd wazuh-dashboard-ml-commons
yarn install
echo "Building Wazuh ML Commons plugin"
yarn build
echo "Copying Wazuh ML Commons plugin"
mkdir /home/node/packages/wazuh-ml-commons-plugin
cp -r build/* /home/node/packages/wazuh-ml-commons-plugin
Loading