]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
correctly search for definitions directories
authorAlfredo Deza <alfredo@deza.pe>
Thu, 16 Oct 2014 15:03:19 +0000 (11:03 -0400)
committerAlfredo Deza <alfredo@deza.pe>
Thu, 16 Oct 2014 15:03:19 +0000 (11:03 -0400)
Signed-off-by: Alfredo Deza <alfredo@deza.pe>
jjb/config/config

index 13b00616c2781cd0ba43818bdd95e2ebac8e2a2b..839a3d51a1c20b62a8a3d9e0bbd86f42bd1edb25 100644 (file)
@@ -24,13 +24,16 @@ fi
 # Test every definition if available in the current repository and update the jobs
 # if they do define one (they should always define their definitions)
 for dir in `ls .`; do
-    if [[ -d $dir/config ]] && [[ -f $dir/config/definitions ]]; then
+    definitions_dir="$dir/config/definitions"
+    if [ -d "$definitions_dir" ]; then
+        echo "found definitions directory: $definitions_dir"
+
         # Test the definitions first
-        venv/bin/jenkins-jobs test $dir/config/definitions -o /tmp/output
+        venv/bin/jenkins-jobs test $definitions_dir -o /tmp/output
 
         # Update Jenkins with the output if they passed the test phase
         # Note that this needs proper permissions with the right credentials to the
         # correct Jenkins instance.
-        venv/bin/jenkins-jobs update $dir/config/definitions
+        venv/bin/jenkins-jobs update $definitions_dir
     fi
 done