2019-03-28 11:32:49 +01:00
|
|
|
#! /bin/sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
if ! test -f yaml-config-plugin-0.9.0.jar; then
|
|
|
|
wget https://github.com/tomzo/gocd-yaml-config-plugin/releases/download/0.9.0/yaml-config-plugin-0.9.0.jar
|
|
|
|
fi
|
2021-07-12 10:09:28 +02:00
|
|
|
sha1sum -c yaml-config-plugin-0.9.0.jar.sha1
|
2019-03-28 11:32:49 +01:00
|
|
|
|
2019-03-27 14:36:11 +01:00
|
|
|
for file in *.erb; do
|
|
|
|
erb -T - $file > $(basename $file .erb)
|
|
|
|
done
|
2019-03-28 11:32:49 +01:00
|
|
|
|
2022-04-05 13:13:15 +02:00
|
|
|
grep group: *.yaml | cut -d: -f3 | sort -u | while read group; do
|
|
|
|
case $group in
|
|
|
|
BCI|Factory|Leap|Admin|LEO|MicroOS|Monitors|openSUSE.Checkers|SLE15.Stagings|SLE15.Target|SLE.Checkers)
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "Do not create new groups without being admin and knowing the consequences - found $group"
|
|
|
|
exit 1
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
2019-03-28 11:32:49 +01:00
|
|
|
for file in *.gocd.yaml; do
|
|
|
|
java -jar yaml-config-plugin-0.9.0.jar syntax $file
|
|
|
|
done
|
2022-04-05 13:13:15 +02:00
|
|
|
|