Initial draft of plugin.
All checks were successful
ci/woodpecker/push/dockerhub Pipeline was successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
ci/woodpecker/push/test/2 Pipeline was successful

This commit is contained in:
Stephan Schnabel 2025-06-18 14:12:00 +02:00
parent acb6987200
commit 33b70ed5ae
Signed by: stephan.schnabel
SSH key fingerprint: SHA256:99zuzxNGFb5/5P+E/O7ONU2qhUojUe/D8rIPTW+9Xp0
16 changed files with 686 additions and 0 deletions

44
entrypoint.sh Executable file
View file

@ -0,0 +1,44 @@
#!/bin/bash
set -eu;
##
## build command, see https://docs.renovatebot.com/config-validation/
##
COMMAND="renovate-config-validator"
if [[ "${PLUGIN_STRICT:-true}" == "true" ]]; then
COMMAND+=" --strict"
fi
# custom args, e.g. docker run --rm --volume=$(pwd):$(pwd) --workdir=$(pwd) --env=CI=test kokuwaio/renovate-config-validator --strict
if [[ -n "${1:-}" ]]; then
COMMAND+=" $*"
fi
##
## collect files
##
# https://docs.renovatebot.com/configuration-options/#configuration-options
FILES=$(find "$(pwd)" -type f \
\( -name 'default.json' \
-o -name 'renovate.json' \
-o -name 'renovate.json5' \
-o -name '.renovaterc' \
-o -name '.renovaterc.json' \
-o -name '.renovaterc.json5' \) \
-not -path '*/node_modules/*')
if [[ ! "$FILES" ]]; then
echo "No files found!"
exit 1
fi
for FILE in ${FILES}; do
COMMAND+=" $FILE"
done
##
## execute command
##
echo "$COMMAND"
eval "$COMMAND"