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
ci/woodpecker/manual/dockerhub Pipeline was successful
ci/woodpecker/manual/lint Pipeline was successful
ci/woodpecker/manual/build Pipeline was successful
ci/woodpecker/manual/test/1 Pipeline was successful
ci/woodpecker/manual/test/2 Pipeline was successful
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
ci/woodpecker/manual/dockerhub Pipeline was successful
ci/woodpecker/manual/lint Pipeline was successful
ci/woodpecker/manual/build Pipeline was successful
ci/woodpecker/manual/test/1 Pipeline was successful
ci/woodpecker/manual/test/2 Pipeline was successful
This commit is contained in:
parent
2fe1a4ebb8
commit
a01b3aad0f
16 changed files with 713 additions and 0 deletions
41
entrypoint.sh
Executable file
41
entrypoint.sh
Executable file
|
@ -0,0 +1,41 @@
|
|||
#!/bin/bash
|
||||
set -eu;
|
||||
|
||||
##
|
||||
## check if any yaml file is present
|
||||
##
|
||||
|
||||
FILES=$(find "$(pwd)" -type f -name '*.yml' -o -name '*.yaml')
|
||||
if [[ ! "$FILES" ]]; then
|
||||
echo "No yaml file found!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
##
|
||||
## build command
|
||||
##
|
||||
|
||||
COMMAND="yamllint"
|
||||
if [[ -n "${PLUGIN_CONFIG_FILE:-}" ]]; then
|
||||
COMMAND+=" --config-file=$PLUGIN_CONFIG"
|
||||
fi
|
||||
COMMAND+=" --format=${PLUGIN_FORMAT:-colored}"
|
||||
if [[ "${PLUGIN_STRICT:-true}" == "true" ]]; then
|
||||
COMMAND+=" --strict"
|
||||
fi
|
||||
if [[ "${PLUGIN_NO_WARNINGS:-}" == "true" ]]; then
|
||||
COMMAND+=" --no-warnings"
|
||||
fi
|
||||
COMMAND+=" $(pwd)"
|
||||
|
||||
# custom args, e.g. docker run --rm --volume=$(pwd):$(pwd) --workdir=$(pwd) --env=CI=test kokuwaio/yamllint --format=json
|
||||
if [[ -n "${1:-}" ]]; then
|
||||
COMMAND+=" $*"
|
||||
fi
|
||||
|
||||
##
|
||||
## execute command
|
||||
##
|
||||
|
||||
echo "$COMMAND"
|
||||
eval "$COMMAND"
|
Loading…
Add table
Add a link
Reference in a new issue