aboutsummaryrefslogtreecommitdiffstats
path: root/Jenkinsfile
diff options
context:
space:
mode:
Diffstat (limited to 'Jenkinsfile')
-rw-r--r--Jenkinsfile23
1 files changed, 23 insertions, 0 deletions
diff --git a/Jenkinsfile b/Jenkinsfile
new file mode 100644
index 00000000..42756ece
--- /dev/null
+++ b/Jenkinsfile
@@ -0,0 +1,23 @@
+properties([
+ pipelineTriggers([cron('H * * * *')])
+])
+node {
+ checkout scm
+ def packages = ["python_moonutilities","python_moondb","python_moonclient"]
+ def subtests = [:]
+ for (x in packages) {
+ def pkg = x
+ subtests[pkg] = {
+ withDockerContainer('wukongsun/moon_python_unit_test') {
+ stage("Install prerequisites for package ${pkg}") {
+ sh("pip install pytest requests_mock requests --upgrade")
+ sh("cd ${pkg} && pip install -r tests/unit_python/requirements.txt && pip install .")
+ }
+ stage("Unit test for package ${pkg}") {
+ sh "cd ${pkg}/tests/unit_python && pytest ."
+ }
+ }
+ }
+ }
+ parallel subtests
+} \ No newline at end of file