aboutsummaryrefslogtreecommitdiffstats
path: root/Jenkinsfile
diff options
context:
space:
mode:
authorRHE <rebirthmonkey@gmail.com>2018-01-17 14:35:01 +0100
committerRHE <rebirthmonkey@gmail.com>2018-01-17 14:35:01 +0100
commite475b83c1f711e77814d68f933ff2d661102806a (patch)
tree76a710b94a3c16a6b8dd55c84070683ac3008828 /Jenkinsfile
parent920c9eb45f976b264b3d66c5e6cef80b1354a825 (diff)
jenkins conf
Change-Id: Ide859a78b8b4f05008106d9aca8f84eaeb0f538b Signed-off-by: RHE <rebirthmonkey@gmail.com>
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