Skip to content

Commit 05e5d79

Browse files
yenienserranogonzaarancibiaasteriscos
authored
Refactor dashboard package build workflow to use single branch input (#904)
* Add ML commons to package builder workflows * Add ML commons to dev tools * Add support for Wazuh Security Analytics plugin in package builder * Remove 1 input to test * Updates plugin naming convention in dashboard workflow * Adds support for report and security analytics plugins * Fixes package name for security analytics plugin * Refactors branch names and adds support for ML Commons and Security Analytics plugins in build scripts * Add SECURITY_ANALYTICS_SHA * Add security analytics to base-packages.Dockerfile * Fixes environment variable reference for security analytics plugin * Adds ML Commons and Security Analytics SHA to package names * Consolidates plugin reference inputs into single parameter * Removes default branch value from workflow input reference_plugins * Refactors dashboard workflow to use matrix strategy for plugin builds * Add checkout code to setup-variables * Refactors commit SHA concatenation for package naming * Refactors plugin matrix to handle multiple plugins individually * Adds security analytics support to base package build * Fix readme --------- Co-authored-by: gonzaarancibia <gonzaloarancibia48@gmail.com> Co-authored-by: Gonzalo Arancibia <72573241+gonzaarancibia@users.noreply.github.com> Co-authored-by: Federico Rodriguez <federico.rodriguez@wazuh.com>
1 parent a12f348 commit 05e5d79

16 files changed

Lines changed: 509 additions & 165 deletions

.github/workflows/5_builderpackage_dashboard.yml

Lines changed: 221 additions & 146 deletions
Large diffs are not rendered by default.
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
name: Build Wazuh Dashboard Plugins
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
reference_plugins:
7+
type: string
8+
description: 'Git ref (branch/tag) to use for all plugins'
9+
required: false
10+
version_opensearch:
11+
type: string
12+
description: 'OpenSearch version'
13+
required: true
14+
name:
15+
description: 'Name of the plugin'
16+
required: true
17+
type: string
18+
packageName:
19+
description: 'Name of the package'
20+
required: true
21+
type: string
22+
repo:
23+
type: string
24+
description: 'Repository of the plugin ( owner/repo )'
25+
required: true
26+
path:
27+
description: 'Path to the plugin ( only for wazuh-dashboard-plugins repo )'
28+
required: false
29+
type: string
30+
pathPlugin:
31+
type: string
32+
description: 'Path to the plugins folder ( only for wazuh-dashboard-plugins repo )'
33+
required: false
34+
35+
36+
jobs:
37+
build-plugins:
38+
name: Build Plugin ${{ inputs.name }}
39+
runs-on: ubuntu-latest
40+
env:
41+
PLUGIN_REF: ${{ inputs.reference_plugins }}
42+
steps:
43+
- name: Checkout Wazuh Dashboards
44+
uses: actions/checkout@v4
45+
with:
46+
ref: ${{ github.ref_name }}
47+
48+
- name: Setup Node
49+
uses: actions/setup-node@v4
50+
with:
51+
node-version-file: '.nvmrc'
52+
registry-url: 'https://registry.npmjs.org'
53+
54+
- name: Install Yarn
55+
run: npm install -g yarn@^1.22.10
56+
57+
- name: Check if plugin reference exists or use github.ref_name
58+
run: |
59+
if [ -z "${{ inputs.reference_plugins }}" ]; then
60+
echo "No plugin reference provided, using github.ref_name: ${{ github.ref_name }}"
61+
echo "PLUGIN_REF=${{ github.ref_name }}" >> $GITHUB_ENV
62+
else
63+
if [ "$(git ls-remote https://github.com/${{ inputs.repo }}.git ${{ inputs.reference_plugins }})" ]; then
64+
echo "Plugin reference ${{ inputs.reference_plugins }} exists."
65+
PLUGIN_REF=${{ inputs.reference_plugins }}
66+
else
67+
echo "Plugin reference ${{ inputs.reference_plugins }} does not exist, trying with github.ref_name: ${{ github.ref_name }}"
68+
if [ "$(git ls-remote https://github.com/${{ inputs.repo }}.git ${{ github.ref_name }})" ]; then
69+
echo "Plugin reference ${{ github.ref_name }} exists."
70+
PLUGIN_REF=${{ github.ref_name }}
71+
else
72+
echo "Plugin reference ${{ github.ref_name }} does not exist. Please check if the reference is correct."
73+
exit 1
74+
fi
75+
fi
76+
77+
echo "PLUGIN_REF=$PLUGIN_REF" >> $GITHUB_ENV
78+
fi
79+
80+
- name: Checkout Plugin
81+
uses: actions/checkout@v4
82+
with:
83+
repository: ${{ inputs.repo }}
84+
ref: ${{ env.PLUGIN_REF }}
85+
path: ${{ inputs.pathPlugin || format('plugins/{0}', inputs.name) }}
86+
87+
- name: Move plugin to correct path and remove wazuh-dashboard-plugins parent folder
88+
if: ${{ inputs.repo == 'wazuh/wazuh-dashboard-plugins' }}
89+
run: |
90+
mv ${{inputs.pathPlugin}}/${{ inputs.path }} plugins/${{ inputs.name }}
91+
rm -rf ${{inputs.pathPlugin}}
92+
93+
- name: Bootstrap with Plugins
94+
run: yarn osd bootstrap --single-version=loose
95+
96+
- name: Build Plugin
97+
working-directory: plugins/${{ inputs.name }}
98+
run: node ../../scripts/plugin_helpers build --opensearch-dashboards-version=${{ inputs.version_opensearch }} 2>&1 | tee build.log
99+
100+
- name: Upload Plugin Artifact
101+
if: success()
102+
uses: actions/upload-artifact@v4
103+
with:
104+
name: ${{ inputs.packageName }}
105+
path: plugins/${{ inputs.name }}/build/*.zip
106+
retention-days: 1
107+
108+
- name: Upload Build Log
109+
if: failure()
110+
uses: actions/upload-artifact@v4
111+
with:
112+
name: ${{ inputs.name }}-${{ inputs.version_opensearch }}-failed-log
113+
path: plugins/${{ inputs.name }}/build.log
114+
retention-days: 1

.github/workflows/build_wazuh_dashboard_with_plugins.yml

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ on:
4242
description: 'Branch/tag/commit of the wazuh-dashboard-reporting repository to build the main plugins'
4343
required: true
4444
default: 'main'
45+
reference_ml_commons_plugins:
46+
type: string
47+
description: 'Branch/tag/commit of the wazuh-dashboard-ml-commons repository to build the ML Commons plugins'
48+
required: true
49+
default: 'main'
4550
is_stage:
4651
type: boolean
4752
description: 'Set production nomenclature'
@@ -83,6 +88,10 @@ on:
8388
type: string
8489
required: true
8590
default: 'main'
91+
reference_ml_commons_plugins:
92+
type: string
93+
required: true
94+
default: 'main'
8695
is_stage:
8796
type: boolean
8897
required: true
@@ -111,6 +120,7 @@ jobs:
111120
COMMIT_SHA: ${{ steps.setup-variables.outputs.COMMIT_SHA }}
112121
PLUGINS_SHA: ${{ steps.setup-variables.outputs.PLUGINS_SHA }}
113122
SECURITY_SHA: ${{ steps.setup-variables.outputs.SECURITY_SHA }}
123+
ML_COMMONS_SHA: ${{ steps.setup-variables.outputs.ML_COMMONS_SHA }}
114124
REPORTING_SHA: ${{ steps.setup-variables.outputs.REPORTING_SHA }}
115125
PRODUCTION: ${{ steps.setup-variables.outputs.PRODUCTION }}
116126
WAZUH_DASHBOARD_SLIM: ${{ steps.setup-variables.outputs.WAZUH_DASHBOARD_SLIM }}
@@ -119,6 +129,7 @@ jobs:
119129
WAZUH_PLUGINS_CORE: ${{ steps.setup-variables.outputs.WAZUH_PLUGINS_CORE }}
120130
WAZUH_PLUGINS_CHECK_UPDATES: ${{ steps.setup-variables.outputs.WAZUH_PLUGINS_CHECK_UPDATES }}
121131
WAZUH_REPORT_PLUGIN: ${{ steps.setup-variables.outputs.WAZUH_REPORT_PLUGIN }}
132+
WAZUH_ML_COMMONS_PLUGIN: ${{ steps.setup-variables.outputs.WAZUH_ML_COMMONS_PLUGIN }}
122133
PACKAGE_NAME: ${{ steps.setup-variables.outputs.PACKAGE_NAME }}
123134
ARCHITECTURE_FLAG: ${{ steps.setup-variables.outputs.ARCHITECTURE_FLAG }}
124135
steps:
@@ -149,6 +160,12 @@ jobs:
149160
git clone -b ${{ inputs.reference_report_plugins }} --single-branch https://github.com/wazuh/wazuh-dashboard-reporting.git wzrp
150161
cd wzrp
151162
echo "WAZUH_REPORTING_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
163+
- name: Get SHA of wazuh-dashboard-ml-commons plugin
164+
id: get-ml-commons-sha
165+
run: |
166+
git clone -b ${{ inputs.reference_ml_commons_plugins }} --single-branch https://github.com/wazuh/wazuh-dashboard-ml-commons.git wzml
167+
cd wzml
168+
echo "WAZUH_ML_COMMONS_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
152169
153170
- name: Setup Node
154171
uses: actions/setup-node@v4
@@ -180,6 +197,7 @@ jobs:
180197
COMMIT_SHA=$(git rev-parse --short HEAD)
181198
PLUGINS_SHA=${{steps.get-plugins-sha.outputs.WAZUH_PLUGINS_SHA}}
182199
SECURITY_SHA=${{steps.get-security-sha.outputs.WAZUH_SECURITY_SHA}}
200+
ML_COMMONS_SHA=${{ steps.get-ml-commons-sha.outputs.WAZUH_ML_COMMONS_SHA }}
183201
REPORTING_SHA=${{steps.get-reporting-sha.outputs.WAZUH_REPORTING_SHA}}
184202
if [ "${{ inputs.is_stage }}" = "true" ]; then
185203
PRODUCTION=--production
@@ -189,6 +207,7 @@ jobs:
189207
WAZUH_DASHBOARD_SLIM=wazuh-dashboard_${VERSION}-${REVISION}_${{ (inputs.ARCHITECTURE == 'x86_64' || inputs.ARCHITECTURE == 'amd64') && 'x64' || 'arm64' }}.tar.gz
190208
WAZUH_SECURITY_PLUGIN=wazuh-security-dashboards-plugin_${VERSION}-${REVISION}_$(echo ${{ inputs.reference_security_plugins }} | sed 's/\//-/g').zip
191209
WAZUH_REPORT_PLUGIN=reports-dashboards_${VERSION}-${REVISION}_$(echo ${{ inputs.reference_report_plugins }} | sed 's/\//-/g').zip
210+
WAZUH_ML_COMMONS_PLUGIN=wazuh-ml-commons-plugin_${VERSION}-${REVISION}_$(echo ${{ inputs.reference_ml_commons_plugins }} | sed 's/\//-/g').zip
192211
WAZUH_PLUGINS_WAZUH=wazuh-dashboard-plugins_wazuh_${VERSION}-${REVISION}_$(echo ${{ inputs.reference_wazuh_plugins }} | sed 's/\//-/g').zip
193212
WAZUH_PLUGINS_CORE=wazuh-dashboard-plugins_wazuh-core_${VERSION}-${REVISION}_$(echo ${{ inputs.reference_wazuh_plugins }} | sed 's/\//-/g').zip
194213
WAZUH_PLUGINS_CHECK_UPDATES=wazuh-dashboard-plugins_wazuh-check-updates_${VERSION}-${REVISION}_$(echo ${{ inputs.reference_wazuh_plugins }} | sed 's/\//-/g').zip
@@ -217,6 +236,7 @@ jobs:
217236
echo "COMMIT_SHA=$COMMIT_SHA" >> $GITHUB_OUTPUT
218237
echo "PLUGINS_SHA=$PLUGINS_SHA" >> $GITHUB_OUTPUT
219238
echo "SECURITY_SHA=$SECURITY_SHA" >> $GITHUB_OUTPUT
239+
echo "ML_COMMONS_SHA=$ML_COMMONS_SHA" >> $GITHUB_OUTPUT
220240
echo "REPORTING_SHA=$REPORTING_SHA" >> $GITHUB_OUTPUT
221241
echo "PRODUCTION=$PRODUCTION" >> $GITHUB_OUTPUT
222242
echo "WAZUH_DASHBOARD_SLIM=$WAZUH_DASHBOARD_SLIM" >> $GITHUB_OUTPUT
@@ -277,6 +297,15 @@ jobs:
277297
with:
278298
reference: ${{ inputs.reference_security_plugins }}
279299

300+
build-ml-commons-plugin:
301+
needs: [validate-job]
302+
name: Build ml commons plugin
303+
permissions:
304+
pull-requests: write
305+
uses: wazuh/wazuh-dashboard-ml-commons/.github/workflows/5_builderpackage_ml_commons_plugin.yml@main
306+
with:
307+
reference: ${{ inputs.reference_ml_commons_plugins }}
308+
280309
build-report-plugin:
281310
needs: [validate-job]
282311
name: Build reporting plugin
@@ -287,7 +316,15 @@ jobs:
287316
reference: ${{ inputs.reference_report_plugins }}
288317

289318
build-package:
290-
needs: [setup-variables, build-main-plugins, build-base, build-security-plugin, build-report-plugin]
319+
needs:
320+
[
321+
setup-variables,
322+
build-main-plugins,
323+
build-base,
324+
build-security-plugin,
325+
build-ml-commons-plugin,
326+
build-report-plugin,
327+
]
291328
runs-on: ${{ (inputs.architecture == 'arm64' || inputs.architecture == 'aarch64') && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }}
292329
name: Generate packages
293330
steps:
@@ -327,6 +364,12 @@ jobs:
327364
with:
328365
name: ${{ needs.setup-variables.outputs.WAZUH_PLUGINS_CHECK_UPDATES }}
329366
path: ${{ needs.setup-variables.outputs.CURRENT_DIR }}/artifacts/plugins
367+
- name: Download ml commons plugin artifact
368+
uses: actions/download-artifact@v4
369+
with:
370+
name: ${{ needs.setup-variables.outputs.WAZUH_ML_COMMONS_PLUGIN }}
371+
path: ${{ needs.setup-variables.outputs.CURRENT_DIR }}/artifacts/ml-commons-plugin
372+
330373
- name: Download report plugin artifact
331374
uses: actions/download-artifact@v4
332375
with:
@@ -337,6 +380,7 @@ jobs:
337380
run: |
338381
zip -r -j ${{ needs.setup-variables.outputs.CURRENT_DIR }}/artifacts/wazuh-package.zip ${{ needs.setup-variables.outputs.CURRENT_DIR }}/artifacts/plugins
339382
zip -r -j ${{ needs.setup-variables.outputs.CURRENT_DIR }}/artifacts/security-package.zip ${{ needs.setup-variables.outputs.CURRENT_DIR }}/artifacts/security-plugin
383+
zip -r -j ${{ needs.setup-variables.outputs.CURRENT_DIR }}/artifacts/ml-commons-package.zip ${{ needs.setup-variables.outputs.CURRENT_DIR }}/artifacts/ml-commons-plugin
340384
zip -r -j ${{ needs.setup-variables.outputs.CURRENT_DIR }}/artifacts/report-package.zip ${{ needs.setup-variables.outputs.CURRENT_DIR }}/artifacts/report-plugin
341385
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 }}
342386
@@ -347,9 +391,10 @@ jobs:
347391
-r ${{ inputs.revision }} ${{ needs.setup-variables.outputs.ARCHITECTURE_FLAG }} \
348392
-a file://${{needs.setup-variables.outputs.CURRENT_DIR}}/artifacts/wazuh-package.zip \
349393
-s file://${{needs.setup-variables.outputs.CURRENT_DIR}}/artifacts/security-package.zip \
394+
-ml file://${{needs.setup-variables.outputs.CURRENT_DIR}}/artifacts/ml-commons-package.zip \
350395
-b file://${{needs.setup-variables.outputs.CURRENT_DIR}}/artifacts/dashboard-package.zip \
351396
-rp file://${{needs.setup-variables.outputs.CURRENT_DIR}}/artifacts/report-package.zip \
352-
--commit-sha ${{needs.setup-variables.outputs.COMMIT_SHA}}-${{needs.setup-variables.outputs.PLUGINS_SHA}}-${{needs.setup-variables.outputs.SECURITY_SHA}}-${{needs.setup-variables.outputs.REPORTING_SHA}} \
397+
--commit-sha ${{needs.setup-variables.outputs.COMMIT_SHA}}-${{needs.setup-variables.outputs.PLUGINS_SHA}}-${{needs.setup-variables.outputs.SECURITY_SHA}}-${{needs.setup-variables.outputs.REPORTING_SHA}}-${{needs.setup-variables.outputs.ML_COMMONS_SHA}} \
353398
--${{ inputs.system }} ${{ needs.setup-variables.outputs.PRODUCTION }} --debug
354399
355400
- name: Upload artifact

dev-tools/build-dev-image/build-multiarch.sh

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33
# Default values
44
NODE_VERSION="20.18.3"
55
OPENSEARCH_DASHBOARD_VERSION="3.2.0.0"
6-
WAZUH_DASHBOARD_BRANCH="migrate-main-to-3.2.0"
7-
WAZUH_DASHBOARD_SECURITY_BRANCH="migrate-main-to-3.2.0.0"
8-
WAZUH_DASHBOARD_REPORTING_BRANCH="migrate-main-to-3.2.0.0"
9-
WAZUH_DASHBOARD_PLUGINS_BRANCH="migrate-main-to-3.2.0"
6+
WAZUH_DASHBOARD_BRANCH="main"
7+
WAZUH_DASHBOARD_SECURITY_BRANCH="main"
8+
WAZUH_DASHBOARD_REPORTING_BRANCH="main"
9+
WAZUH_DASHBOARD_PLUGINS_BRANCH="main"
10+
WAZUH_DASHBOARD_ML_COMMONS_BRANCH="main"
11+
WAZUH_DASHBOARD_SECURITY_ANALYTICS_BRANCH="main"
1012
TAG="3.2.0-5.0.0"
1113
PUSH=false
1214

@@ -22,6 +24,8 @@ OPTIONS:
2224
-s, --security-branch Wazuh Dashboard Security branch (default: $WAZUH_DASHBOARD_SECURITY_BRANCH)
2325
-r, --reporting-branch Wazuh Dashboard Reporting branch (default: $WAZUH_DASHBOARD_REPORTING_BRANCH)
2426
-p, --plugins-branch Wazuh Dashboard Plugins branch (default: $WAZUH_DASHBOARD_PLUGINS_BRANCH)
27+
-ml, --ml-commons-branch Wazuh Dashboard ML Commons branch (default: $WAZUH_DASHBOARD_ML_COMMONS_BRANCH)
28+
-sa, --security-analytics-branch Wazuh Dashboard Security Analytics branch (default: $WAZUH_DASHBOARD_SECURITY_ANALYTICS_BRANCH)
2529
-t, --tag Image tag (default: $TAG)
2630
--push Push image to registry
2731
-h, --help Show this help
@@ -60,6 +64,14 @@ while [[ $# -gt 0 ]]; do
6064
WAZUH_DASHBOARD_PLUGINS_BRANCH="$2"
6165
shift 2
6266
;;
67+
-ml|--ml-commons-branch)
68+
WAZUH_DASHBOARD_ML_COMMONS_BRANCH="$2"
69+
shift 2
70+
;;
71+
-sa|--security-analytics-branch)
72+
WAZUH_DASHBOARD_SECURITY_ANALYTICS_BRANCH="$2"
73+
shift 2
74+
;;
6375
-t|--tag)
6476
TAG="$2"
6577
shift 2
@@ -88,6 +100,8 @@ echo "Wazuh Dashboard Branch: $WAZUH_DASHBOARD_BRANCH"
88100
echo "Security Branch: $WAZUH_DASHBOARD_SECURITY_BRANCH"
89101
echo "Reporting Branch: $WAZUH_DASHBOARD_REPORTING_BRANCH"
90102
echo "Plugins Branch: $WAZUH_DASHBOARD_PLUGINS_BRANCH"
103+
echo "ML Commons Branch: $WAZUH_DASHBOARD_ML_COMMONS_BRANCH"
104+
echo "Security Analytics Branch: $WAZUH_DASHBOARD_SECURITY_ANALYTICS_BRANCH"
91105
echo "Tag: quay.io/wazuh/osd-dev:$TAG"
92106
echo "Push: $PUSH"
93107
echo "==========================="
@@ -105,6 +119,8 @@ BUILDX_ARGS=(
105119
--build-arg WAZUH_DASHBOARD_SECURITY_BRANCH="$WAZUH_DASHBOARD_SECURITY_BRANCH"
106120
--build-arg WAZUH_DASHBOARD_REPORTING_BRANCH="$WAZUH_DASHBOARD_REPORTING_BRANCH"
107121
--build-arg WAZUH_DASHBOARD_PLUGINS_BRANCH="$WAZUH_DASHBOARD_PLUGINS_BRANCH"
122+
--build-arg WAZUH_DASHBOARD_ML_COMMONS_BRANCH="$WAZUH_DASHBOARD_ML_COMMONS_BRANCH"
123+
--build-arg WAZUH_DASHBOARD_SECURITY_ANALYTICS_BRANCH="$WAZUH_DASHBOARD_SECURITY_ANALYTICS_BRANCH"
108124
-t quay.io/wazuh/osd-dev:"$TAG"
109125
-f wzd.dockerfile
110126
)

dev-tools/build-dev-image/install-plugins.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ for plugin in $plugins; do
1818
if [[ $plugin == "wazuh-dashboards-reporting" ]]; then
1919
git clone --depth 1 --branch ${WAZUH_DASHBOARD_REPORTING_BRANCH} https://github.com/wazuh/$plugin.git
2020
fi
21+
# Clone the Wazuh ML Commons plugin
22+
if [[ $plugin == "wazuh-dashboard-ml-commons" ]]; then
23+
git clone --depth 1 --branch ${WAZUH_DASHBOARD_ML_COMMONS_BRANCH} https://github.com/wazuh/$plugin.git
24+
fi
25+
# Clone the Wazuh dashboard security analytics plugin
26+
if [[ $plugin == "wazuh-dashboard-security-analytics" ]]; then
27+
git clone --depth 1 --branch ${WAZUH_DASHBOARD_SECURITY_ANALYTICS_BRANCH} https://github.com/wazuh/$plugin.git
28+
fi
2129
# Clone the Wazuh dashboards plugins and move the plugins to the plugins folder
2230
if [[ $plugin == "wazuh-dashboard-plugins" ]]; then
2331
git clone --depth 1 --branch ${WAZUH_DASHBOARD_PLUGINS_BRANCH} https://github.com/wazuh/$plugin.git

dev-tools/build-dev-image/plugins

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,5 @@ dashboards-observability
77
wazuh-security-dashboards-plugin
88
wazuh-dashboard-plugins
99
wazuh-dashboards-reporting
10+
wazuh-dashboard-security-analytics
11+
wazuh-dashboard-ml-commons

dev-tools/build-dev-image/wzd.dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
# --build-arg WAZUH_DASHBOARD_SECURITY_BRANCH=main \
77
# --build-arg WAZUH_DASHBOARD_REPORTING_BRANCH=main \
88
# --build-arg WAZUH_DASHBOARD_PLUGINS_BRANCH=main \
9+
# --build-arg WAZUH_DASHBOARD_ML_COMMONS_BRANCH=main \
10+
# --build-arg WAZUH_DASHBOARD_SECURITY_ANALYTICS_BRANCH=main \
911
# -t quay.io/wazuh/osd-dev:3.2.0-5.0.0 \
1012
# -f wzd.dockerfile .
1113

@@ -16,6 +18,8 @@ ARG WAZUH_DASHBOARD_BRANCH
1618
ARG WAZUH_DASHBOARD_SECURITY_BRANCH
1719
ARG WAZUH_DASHBOARD_REPORTING_BRANCH
1820
ARG WAZUH_DASHBOARD_PLUGINS_BRANCH
21+
ARG WAZUH_DASHBOARD_ML_COMMONS_BRANCH
22+
ARG WAZUH_DASHBOARD_SECURITY_ANALYTICS_BRANCH
1923
USER node
2024
RUN git clone --depth 1 --branch ${WAZUH_DASHBOARD_BRANCH} https://github.com/wazuh/wazuh-dashboard.git /home/node/kbn
2125
RUN chown node.node /home/node/kbn

dev-tools/build-packages/README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ The script needs 4 different zip files, containing the following respectively:
1919
- The build of each plugin in `wazuh-dashboard-plugins` repo
2020
- The build of the `wazuh-security-dashboards-plugin` repo
2121
- The build of the `wazuh-dashboards-reporting ` repo
22+
- The build of the `wazuh-dashboard-ml-commons ` repo
23+
- The build of the `wazuh-dashboard-security-analytics ` repo
2224

2325
### Building packages
2426

@@ -30,7 +32,9 @@ The inputs are the following:
3032
- `-a`, `--app`: URL or path to the zip that contains the `wazuh-dashboard-plugins` plugins build.
3133
- `-b`, `--base`: URL or path to the zip that contains the `wazuh-dashboard build`.
3234
- `-s`, `--security`: URL or path to the zip that contains the `wazuh-security-dashboards-plugin` build.
33-
- `-rp`, `--reportPlugin`: URL or path to the zip that contains the `wazuh-dashboards-reporting` build.
35+
- `-rp`, `--reportPlugin`: URL or path to the zip that contains the `wazuh-dashboard-reporting` build.
36+
- `-ml`, `--ml`: URL or path to the zip that contains the `wazuh-dashboard-ml-commons` build.
37+
- `-sa`, `--securityAnalytics`: URL or path to the zip that contains the `wazuh-dashboard-security-analytics` build.
3438
- `-r`, `--revision`: [Optional] Set the revision of this build. By default, it is set to 1.
3539
- `--all-platforms`: Build all platforms.
3640
- `--deb`: Build deb.
@@ -56,5 +60,7 @@ bash build-packages.sh \
5660
--base file:///home/user/packages/dashboard-package.zip \
5761
--security file:///home/user/packages/security-package.zip \
5862
--reportPlugin file:///home/user/packages/report-package.zip \
63+
--ml file:///home/user/packages/ml-package.zip \
64+
--securityAnalytics file:///home/user/packages/securityAnalytics-package.zip \
5965
--revision 2 --deb --silent
60-
```
66+
```

0 commit comments

Comments
 (0)