aboutsummaryrefslogtreecommitdiffstats
path: root/Jenkinsfile
diff options
context:
space:
mode:
authorRuan HE <ruan.he@orange.com>2018-01-17 13:36:33 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-01-17 13:36:33 +0000
commitb0f7daa6f05a1ea2308e82cfc05a1b8d10d4e5dc (patch)
treea927654859b7a43830535825e6887b99a54683ff /Jenkinsfile
parent5d4d84eefac0d8c836125c329220c678d1feb633 (diff)
parente475b83c1f711e77814d68f933ff2d661102806a (diff)
Merge "jenkins conf"
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