summaryrefslogtreecommitdiffstats
path: root/jjb/sdc
diff options
context:
space:
mode:
authoreschcam <cameron.scholes@est.tech>2023-06-20 12:57:54 +0100
committereschcam <cameron.scholes@est.tech>2023-06-20 13:01:31 +0100
commita854a995d3788a8e6c02e4c0bfe3f5257bfd99ec (patch)
treec7eaf35c26ac347e6f7979672822fd2b355fc8e2 /jjb/sdc
parent0aac51a75c52960e954ea404429c88836c49c588 (diff)
Add Python 3 verify step to SDC
Issue-ID: SDC-4498 Signed-off-by: eschcam <cameron.scholes@est.tech> Change-Id: I509ac34fd14b15cf968004b6254f749d87bc3d03
Diffstat (limited to 'jjb/sdc')
-rw-r--r--jjb/sdc/python3-verify.sh12
-rw-r--r--jjb/sdc/sdc.yaml5
2 files changed, 17 insertions, 0 deletions
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/-/"