|
2 | 2 | # SPDX-FileCopyrightText: (C) 2025 Intel Corporation |
3 | 3 | # SPDX-License-Identifier: Apache-2.0 |
4 | 4 |
|
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 }})" |
7 | 7 |
|
8 | 8 |
|
9 | 9 | # Only run at most 1 workflow concurrently per PR, unlimited for branches |
|
77 | 77 | run: | |
78 | 78 | pwd |
79 | 79 | CWD=$(pwd) |
80 | | - cd manufacturing-ai-suite/industrial-edge-insights-time-series/ |
81 | 80 | trivy --version |
82 | 81 | which trivy |
83 | 82 | trivy image --download-db-only |
@@ -164,7 +163,7 @@ jobs: |
164 | 163 | shell: bash |
165 | 164 | run: | |
166 | 165 | pwd |
167 | | - cd manufacturing-ai-suite/industrial-edge-insights-time-series/ |
| 166 | + CWD=$(pwd) |
168 | 167 | trivy --version |
169 | 168 | which trivy |
170 | 169 | trivy image --download-db-only |
@@ -209,7 +208,7 @@ jobs: |
209 | 208 | CWD=$(pwd) |
210 | 209 | if [[ "${{ inputs.application }}" == "time-series" || "${{ inputs.application }}" == "both" ]]; then |
211 | 210 | 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/ |
213 | 212 | make down |
214 | 213 |
|
215 | 214 | OPC_UA_SERVER_IMAGE=$(grep '^OPC_UA_SERVER_IMAGE=' .env | cut -d'=' -f2) |
@@ -246,7 +245,7 @@ jobs: |
246 | 245 |
|
247 | 246 | if [[ "${{ inputs.application }}" == "multimodal" || "${{ inputs.application }}" == "both" ]]; then |
248 | 247 | 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/ |
250 | 249 | make down |
251 | 250 |
|
252 | 251 | WELD_SIMULATOR_IMAGE=$(grep '^WELD_SIMULATOR_IMAGE=' .env | cut -d'=' -f2) |
@@ -316,7 +315,6 @@ jobs: |
316 | 315 | shell: bash |
317 | 316 | run: | |
318 | 317 | pwd |
319 | | - cd manufacturing-ai-suite/industrial-edge-insights-time-series/ |
320 | 318 | trivy --version |
321 | 319 | which trivy |
322 | 320 | trivy image --download-db-only |
@@ -359,6 +357,16 @@ jobs: |
359 | 357 | cd manufacturing-ai-suite/industrial-edge-insights-time-series/ |
360 | 358 | make gen_helm_charts |
361 | 359 | 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 | +
|
362 | 370 | trivy config . >> trivy-timeseries-helm.txt |
363 | 371 | fi |
364 | 372 | |
@@ -405,10 +413,10 @@ jobs: |
405 | 413 | include: |
406 | 414 | - dockerfile-path: manufacturing-ai-suite/industrial-edge-insights-multimodal/weld-data-simulator/Dockerfile |
407 | 415 | 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 |
409 | 417 | - dockerfile-path: manufacturing-ai-suite/industrial-edge-insights-multimodal/fusion-analytics/Dockerfile |
410 | 418 | output-report-path: trivy-fusion-analytics-dockerfile.json |
411 | | - scan-name: Time Series Fusion Analytics Dockerfile |
| 419 | + scan-name: Multimodal Fusion Analytics Dockerfile |
412 | 420 | uses: open-edge-platform/edge-ai-libraries/.github/workflows/trivy-config-mode.yaml@e6e04af3dbca805db9118b85a22ad2998f7eec39 |
413 | 421 | with: |
414 | 422 | dockerfile-path: ${{ matrix.dockerfile-path }} |
@@ -452,7 +460,7 @@ jobs: |
452 | 460 | pwd |
453 | 461 | - name: Convert JSON to CSV |
454 | 462 | run: | |
455 | | - python3 <<EOF |
| 463 | + cat > convert_json_to_csv.py << 'EOF' |
456 | 464 | import json |
457 | 465 | import csv |
458 | 466 | import glob |
@@ -481,6 +489,7 @@ jobs: |
481 | 489 | "test_name": issue["test_name"] |
482 | 490 | }) |
483 | 491 | EOF |
| 492 | + python3 convert_json_to_csv.py |
484 | 493 | - name: Upload Scan Reports |
485 | 494 | uses: actions/upload-artifact@v4 |
486 | 495 | with: |
@@ -673,14 +682,16 @@ jobs: |
673 | 682 | VISUALIZER_GRAFANA_PASSWORD=$(openssl rand -hex 10) |
674 | 683 | MTX_WEBRTCICESERVERS2_0_USERNAME=$(cat /dev/urandom | tr -dc 'a-zA-Z' | head -c 8) |
675 | 684 | MTX_WEBRTCICESERVERS2_0_PASSWORD=$(openssl rand -hex 10) |
| 685 | + HOST_IP=$(hostname -I | awk '{print $1}') |
676 | 686 |
|
677 | 687 | sed -i "s/INFLUXDB_USERNAME=.*/INFLUXDB_USERNAME=${INFLUXDB_USERNAME}/g" .env |
678 | 688 | sed -i "s/INFLUXDB_PASSWORD=.*/INFLUXDB_PASSWORD=${INFLUXDB_PASSWORD}/g" .env |
679 | 689 | sed -i "s/VISUALIZER_GRAFANA_USER=.*/VISUALIZER_GRAFANA_USER=${VISUALIZER_GRAFANA_USER}/g" .env |
680 | 690 | sed -i "s/VISUALIZER_GRAFANA_PASSWORD=.*/VISUALIZER_GRAFANA_PASSWORD=${VISUALIZER_GRAFANA_PASSWORD}/g" .env |
681 | 691 | sed -i "s/MTX_WEBRTCICESERVERS2_0_USERNAME=.*/MTX_WEBRTCICESERVERS2_0_USERNAME=${MTX_WEBRTCICESERVERS2_0_USERNAME}/g" .env |
682 | 692 | 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 | +
|
684 | 695 | make build |
685 | 696 | echo "Deploying using mqtt ingestion" |
686 | 697 | make up |
|
0 commit comments