File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 3
3
# This script assumes you have installed r10k and will perform a syntax check on the Puppetfile if existing
4
4
5
5
echo " Performing a syntax check on the r10k Puppetfile:"
6
- r10k puppetfile check
6
+ PUPPETFILE= " $1 " r10k puppetfile check
7
7
8
8
if [[ $? -ne 0 ]]
9
9
then
Original file line number Diff line number Diff line change @@ -129,6 +129,18 @@ while read -r oldrev newrev refname; do
129
129
echo " puppet-lint not installed. Skipping puppet-lint tests..."
130
130
fi
131
131
fi
132
+ # r10k puppetfile syntax check
133
+ if hash r10k > /dev/null 2>&1 ; then
134
+ if [ " $changedfile " = " Puppetfile" ]; then
135
+ ${subhook_root} /r10k_syntax_check.sh $tmptree /$changedfile
136
+ RC=$?
137
+ if [ " $RC " -ne 0 ]; then
138
+ failures=` expr $failures + 1`
139
+ fi
140
+ fi
141
+ else
142
+ echo " r10k not installed. Skipping r10k Puppetfile test..."
143
+ fi
132
144
done
133
145
done
134
146
rm -rf " $tmptree "
You can’t perform that action at this time.
0 commit comments