Skip to content

Commit 9480ed0

Browse files
authored
industrial-edge-insights-multimodal: DBS github workflow fix (#916)
This PR fixes the DBS (database) workflow in the industrial-edge-insights GitHub Actions workflow by adding the HOST_IP environment variable configuration and correcting scan names from "Time Series" to "Multimodal". The changes also reorder the CWD variable assignment to occur after changing directories Signed-off-by: Pooja Kumbharkar <[email protected]>
1 parent d29d777 commit 9480ed0

File tree

2 files changed

+23
-12
lines changed

2 files changed

+23
-12
lines changed

.github/workflows/industrial-edge-insights-time-series-scans.yml

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
# SPDX-FileCopyrightText: (C) 2025 Intel Corporation
33
# SPDX-License-Identifier: Apache-2.0
44

5-
name: "[Industrial Edge Insights Time Series] SDLe Scans"
6-
run-name: "[Industrial Edge Insights Time Series] SDLe Scans workflow (by @${{ github.actor }} via ${{ github.event_name }})"
5+
name: "[Industrial Edge Insights Multimodal and Time Series] SDLe Scans"
6+
run-name: "[Industrial Edge Insights Multimodal and Time Series] SDLe Scans workflow (by @${{ github.actor }} via ${{ github.event_name }})"
77

88

99
# Only run at most 1 workflow concurrently per PR, unlimited for branches
@@ -77,7 +77,6 @@ jobs:
7777
run: |
7878
pwd
7979
CWD=$(pwd)
80-
cd manufacturing-ai-suite/industrial-edge-insights-time-series/
8180
trivy --version
8281
which trivy
8382
trivy image --download-db-only
@@ -164,7 +163,7 @@ jobs:
164163
shell: bash
165164
run: |
166165
pwd
167-
cd manufacturing-ai-suite/industrial-edge-insights-time-series/
166+
CWD=$(pwd)
168167
trivy --version
169168
which trivy
170169
trivy image --download-db-only
@@ -209,7 +208,7 @@ jobs:
209208
CWD=$(pwd)
210209
if [[ "${{ inputs.application }}" == "time-series" || "${{ inputs.application }}" == "both" ]]; then
211210
echo "Building Time Series Sample app and scanning docker images"
212-
cd manufacturing-ai-suite/industrial-edge-insights-time-series/
211+
cd $CWD/manufacturing-ai-suite/industrial-edge-insights-time-series/
213212
make down
214213
215214
OPC_UA_SERVER_IMAGE=$(grep '^OPC_UA_SERVER_IMAGE=' .env | cut -d'=' -f2)
@@ -246,7 +245,7 @@ jobs:
246245
247246
if [[ "${{ inputs.application }}" == "multimodal" || "${{ inputs.application }}" == "both" ]]; then
248247
echo "Building Multimodal Weld Defect Detection Sample app and scanning docker images"
249-
cd manufacturing-ai-suite/industrial-edge-insights-multimodal/
248+
cd $CWD/manufacturing-ai-suite/industrial-edge-insights-multimodal/
250249
make down
251250
252251
WELD_SIMULATOR_IMAGE=$(grep '^WELD_SIMULATOR_IMAGE=' .env | cut -d'=' -f2)
@@ -316,7 +315,6 @@ jobs:
316315
shell: bash
317316
run: |
318317
pwd
319-
cd manufacturing-ai-suite/industrial-edge-insights-time-series/
320318
trivy --version
321319
which trivy
322320
trivy image --download-db-only
@@ -359,6 +357,16 @@ jobs:
359357
cd manufacturing-ai-suite/industrial-edge-insights-time-series/
360358
make gen_helm_charts
361359
cd helm
360+
INFLUXDB_USERNAME=$(cat /dev/urandom | tr -dc 'a-zA-Z' | head -c 8)
361+
INFLUXDB_PASSWORD=$(openssl rand -hex 10)
362+
VISUALIZER_GRAFANA_USER=$(cat /dev/urandom | tr -dc 'a-zA-Z' | head -c 8)
363+
VISUALIZER_GRAFANA_PASSWORD=$(openssl rand -hex 10)
364+
365+
sed -i "s/INFLUXDB_USERNAME:.*/INFLUXDB_USERNAME: ${INFLUXDB_USERNAME}/g" values.yaml
366+
sed -i "s/INFLUXDB_PASSWORD:.*/INFLUXDB_PASSWORD: ${INFLUXDB_PASSWORD}/g" values.yaml
367+
sed -i "s/VISUALIZER_GRAFANA_USER:.*/VISUALIZER_GRAFANA_USER: ${VISUALIZER_GRAFANA_USER}/g" values.yaml
368+
sed -i "s/VISUALIZER_GRAFANA_PASSWORD:.*/VISUALIZER_GRAFANA_PASSWORD: ${VISUALIZER_GRAFANA_PASSWORD}/g" values.yaml
369+
362370
trivy config . >> trivy-timeseries-helm.txt
363371
fi
364372
@@ -405,10 +413,10 @@ jobs:
405413
include:
406414
- dockerfile-path: manufacturing-ai-suite/industrial-edge-insights-multimodal/weld-data-simulator/Dockerfile
407415
output-report-path: trivy-weld-simulator-dockerfile.json
408-
scan-name: Time Series Weld Data Simulator Dockerfile
416+
scan-name: Multimodal Weld Data Simulator Dockerfile
409417
- dockerfile-path: manufacturing-ai-suite/industrial-edge-insights-multimodal/fusion-analytics/Dockerfile
410418
output-report-path: trivy-fusion-analytics-dockerfile.json
411-
scan-name: Time Series Fusion Analytics Dockerfile
419+
scan-name: Multimodal Fusion Analytics Dockerfile
412420
uses: open-edge-platform/edge-ai-libraries/.github/workflows/trivy-config-mode.yaml@e6e04af3dbca805db9118b85a22ad2998f7eec39
413421
with:
414422
dockerfile-path: ${{ matrix.dockerfile-path }}
@@ -452,7 +460,7 @@ jobs:
452460
pwd
453461
- name: Convert JSON to CSV
454462
run: |
455-
python3 <<EOF
463+
cat > convert_json_to_csv.py << 'EOF'
456464
import json
457465
import csv
458466
import glob
@@ -481,6 +489,7 @@ jobs:
481489
"test_name": issue["test_name"]
482490
})
483491
EOF
492+
python3 convert_json_to_csv.py
484493
- name: Upload Scan Reports
485494
uses: actions/upload-artifact@v4
486495
with:
@@ -673,14 +682,16 @@ jobs:
673682
VISUALIZER_GRAFANA_PASSWORD=$(openssl rand -hex 10)
674683
MTX_WEBRTCICESERVERS2_0_USERNAME=$(cat /dev/urandom | tr -dc 'a-zA-Z' | head -c 8)
675684
MTX_WEBRTCICESERVERS2_0_PASSWORD=$(openssl rand -hex 10)
685+
HOST_IP=$(hostname -I | awk '{print $1}')
676686
677687
sed -i "s/INFLUXDB_USERNAME=.*/INFLUXDB_USERNAME=${INFLUXDB_USERNAME}/g" .env
678688
sed -i "s/INFLUXDB_PASSWORD=.*/INFLUXDB_PASSWORD=${INFLUXDB_PASSWORD}/g" .env
679689
sed -i "s/VISUALIZER_GRAFANA_USER=.*/VISUALIZER_GRAFANA_USER=${VISUALIZER_GRAFANA_USER}/g" .env
680690
sed -i "s/VISUALIZER_GRAFANA_PASSWORD=.*/VISUALIZER_GRAFANA_PASSWORD=${VISUALIZER_GRAFANA_PASSWORD}/g" .env
681691
sed -i "s/MTX_WEBRTCICESERVERS2_0_USERNAME=.*/MTX_WEBRTCICESERVERS2_0_USERNAME=${MTX_WEBRTCICESERVERS2_0_USERNAME}/g" .env
682692
sed -i "s/MTX_WEBRTCICESERVERS2_0_PASSWORD=.*/MTX_WEBRTCICESERVERS2_0_PASSWORD=${MTX_WEBRTCICESERVERS2_0_PASSWORD}/g" .env
683-
693+
sed -i "s/HOST_IP=.*/HOST_IP=${HOST_IP}/g" .env
694+
684695
make build
685696
echo "Deploying using mqtt ingestion"
686697
make up

manufacturing-ai-suite/industrial-edge-insights-multimodal/weld-data-simulator/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
FROM python:3.13-slim
88

99
# Install OpenCV dependencies
10-
RUN apt-get update && apt-get install -y \
10+
RUN apt-get update && apt-get install -y --no-install-recommends \
1111
libgl1 \
1212
libglib2.0-0 \
1313
ffmpeg\

0 commit comments

Comments
 (0)