From: eschcam Date: Tue, 20 Jun 2023 11:57:54 +0000 (+0100) Subject: Add Python 3 verify step to SDC X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=a854a995d3788a8e6c02e4c0bfe3f5257bfd99ec;p=ci-management.git Add Python 3 verify step to SDC Issue-ID: SDC-4498 Signed-off-by: eschcam Change-Id: I509ac34fd14b15cf968004b6254f749d87bc3d03 --- diff --git a/jjb/sdc/python3-verify.sh b/jjb/sdc/python3-verify.sh new file mode 100644 index 000000000..f71c12c02 --- /dev/null +++ b/jjb/sdc/python3-verify.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +py_files=$(find . -name '*.py' -not -path "*/node_modules/*" -not -path "*/target/*") + +if python3 -m py_compile ${py_files} +then + echo "All python files compiled successfully" + exit 0 +else + echo "Failed to compile all files in Python 3" + exit 1 +fi diff --git a/jjb/sdc/sdc.yaml b/jjb/sdc/sdc.yaml index e865ae82f..20a30f46e 100644 --- a/jjb/sdc/sdc.yaml +++ b/jjb/sdc/sdc.yaml @@ -27,6 +27,11 @@ name: sdc project-name: "sdc" jobs: + - "{project-name}-{stream}-{area}-verify-shell": + # This is to ensure all script are Python 3 compatible + area: verify + build-timeout: 45 + script: !include-raw-escape: "python3-verify.sh" - "{project-name}-{stream}-verify-java": # this build is unit test only (Verify 1/2) mvn-params: "-P skip-integration-tests -Dnpm.registry=https://nexus3.onap.org/repository/npm.public/npm/-/"