2022-08-28 08:13:36 -07:00
|
|
|
#!/bin/sh
|
|
|
|
|
2023-04-04 09:24:45 -07:00
|
|
|
echo "looking for change log of $CI_MERGE_REQUEST_IID"
|
|
|
|
|
2022-08-28 08:13:36 -07:00
|
|
|
count=0
|
|
|
|
for i in add remove fix security skip; do
|
|
|
|
[ -f changelog.d/"$CI_MERGE_REQUEST_IID"."$i" ]
|
|
|
|
retcode=$?
|
|
|
|
if [ $retcode -eq 0 ]; then
|
|
|
|
echo "found $CI_MERGE_REQUEST_IID.$i"
|
2023-04-04 09:24:45 -07:00
|
|
|
count=$(( count + 1 ))
|
2022-08-28 08:13:36 -07:00
|
|
|
else
|
|
|
|
echo "no $CI_MERGE_REQUEST_IID.$i"
|
|
|
|
fi
|
|
|
|
done
|
2023-04-04 09:20:46 -07:00
|
|
|
if [ $count -gt 0 ]; then
|
2022-08-28 08:13:36 -07:00
|
|
|
echo "ok"
|
|
|
|
exit 0
|
|
|
|
else
|
|
|
|
echo "must have a changelog entry or explicitly skip it"
|
|
|
|
exit 1
|
|
|
|
fi
|