From 2a4f9d996f3e55d474d6593e080adbb6b75c2164 Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Thu, 16 Oct 2014 11:03:19 -0400 Subject: [PATCH] correctly search for definitions directories Signed-off-by: Alfredo Deza --- jjb/config/config | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/jjb/config/config b/jjb/config/config index 13b00616c..839a3d51a 100644 --- a/jjb/config/config +++ b/jjb/config/config @@ -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 -- 2.47.3