parent
ddd80865f7
commit
4bf13b0000
10 changed files with 62 additions and 12 deletions
.ci
25
.ci/lint.sh
25
.ci/lint.sh
|
@ -1,7 +1,20 @@
|
|||
for i in $(find . -name "docker-compose.yaml" -exec sh -c 'docker-compose -f {} config -q; echo {}:$?' \;); do
|
||||
conf=$(echo $i | cut -d: -f1)
|
||||
return_code=$(echo $i | cut -d: -f2)
|
||||
if [ $return_code -ne "0" ]; then
|
||||
echo $conf return code : $return_code && exit $return_code
|
||||
#!/bin/sh
|
||||
|
||||
find . -name "docker-compose.yaml" | while read -r compose_file; do
|
||||
dir=$(dirname "$compose_file")
|
||||
|
||||
echo "Checking directory: $dir"
|
||||
|
||||
# Source .env if it exists
|
||||
if [ -f "$dir/.env" ]; then
|
||||
set -o allexport
|
||||
. "$dir/.env"
|
||||
set +o allexport
|
||||
fi
|
||||
done
|
||||
|
||||
# Run docker-compose config check
|
||||
if ! docker-compose -f "$compose_file" config -q; then
|
||||
echo "$compose_file return code: 1"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue