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
72
README.md
Normal file
72
README.md
Normal file
|
@ -0,0 +1,72 @@
|
|||
# Yamllint WoodpeckerCI Plugin
|
||||
|
||||
[](https://hub.docker.com/r/kokuwaio/yamllint)
|
||||
[](https://hub.docker.com/r/kokuwaio/yamllint)
|
||||
[](https://git.kokuwa.io/woodpecker/yamllint/src/branch/main/Dockerfile)
|
||||
[](https://git.kokuwa.io/woodpecker/yamllint/src/branch/main/LICENSE)
|
||||
[](https://git.kokuwa.io/woodpecker/yamllint/pulls)
|
||||
[](https://git.kokuwa.io/woodpecker/yamllint/issues)
|
||||
|
||||
A [WoodpeckerCI](https://woodpecker-ci.org) plugin for [yamllint](https://github.com/adrienverge/yamllint) to lint yaml files.
|
||||
Also usable with Gitlab, Github or locally, see examples for usage.
|
||||
|
||||
## Features
|
||||
|
||||
- preconfigure yamllint parameters
|
||||
- searches for yaml files recursive
|
||||
- runnable with local docker daemon
|
||||
|
||||
## Example
|
||||
|
||||
Woodpecker:
|
||||
|
||||
```yaml
|
||||
steps:
|
||||
yamllint:
|
||||
image: kokuwaio/yamllint
|
||||
settings:
|
||||
no-warnings: true
|
||||
format: json
|
||||
when:
|
||||
event: pull_request
|
||||
path: [.yamllint.yaml, "**/*.y*ml"]
|
||||
```
|
||||
|
||||
Gitlab:
|
||||
|
||||
```yaml
|
||||
yamllint:
|
||||
stage: lint
|
||||
image: kokuwaio/yamllint
|
||||
variables:
|
||||
PLUGIN_NO_WARNINGS: true
|
||||
PLUGIN_FORMAT: json
|
||||
rules:
|
||||
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||
changes: [.yamllint.yaml, "**/*.y*ml"]
|
||||
```
|
||||
|
||||
CLI:
|
||||
|
||||
```bash
|
||||
docker run --rm --volume=$(pwd):$(pwd):ro --workdir=$(pwd) kokuwaio/yamllint --no-warnings --format=json
|
||||
```
|
||||
|
||||
## Settings
|
||||
|
||||
| Settings Name | Environment | Default | Description |
|
||||
| --------------| ------------------ | --------- | -------------------------------------------------------------------- |
|
||||
| `config-file` | PLUGIN_CONFIG_FILE | `none` | Configuration file to use, if none is configured [default](https://yamllint.readthedocs.io/en/stable/configuration.html) is used |
|
||||
| `strict` | PLUGIN_STRICT | `true` | Fail on warnings |
|
||||
| `no-warnings` | PLUGIN_NO_WARNINGS | `false` | Output only error level problems |
|
||||
| `format` | PLUGIN_FORMAT | `colored` | Format for parsing output: parsable, standard, colored, github, auto |
|
||||
|
||||
## Alternatives
|
||||
|
||||
| Image | Comment | amd64 | arm64 |
|
||||
| ----------------------------------------------------------------------------------- | --------------------------------- |:-----:|:-----:|
|
||||
| [kokuwaio/yamllint](https://hub.docker.com/r/kokuwaio/yamllint) | Woodpecker plugin | [](https://hub.docker.com/r/kokuwaio/yamllint) | [](https://hub.docker.com/r/kokuwaio/yamllint) |
|
||||
| [pipelinecomponents/yamllint](https://hub.docker.com/r/pipelinecomponents/yamllint) | not a Woodpecker plugin | [](https://hub.docker.com/r/pipelinecomponents/yamllint) | [](https://hub.docker.com/r/pipelinecomponents/yamllint) |
|
||||
| [giantswarm/yamllint](https://hub.docker.com/r/giantswarm/yamllint) | not a Woodpecker plugin | [](https://hub.docker.com/r/giantswarm/yamllint) | [](https://hub.docker.com/r/giantswarm/yamllint) |
|
||||
| [cytopia/yamllint](https://hub.docker.com/r/sdesbure/yamllint) | not a Woodpecker plugin, outdated | [](https://hub.docker.com/r/cytopia/yamllint) | [](https://hub.docker.com/r/cytopia/yamllint) |
|
||||
| [sdesbure/yamllint](https://hub.docker.com/r/sdesbure/yamllint) | not a Woodpecker plugin, outdated | [](https://hub.docker.com/r/sdesbure/yamllint) | [](https://hub.docker.com/r/sdesbure/yamllint) |
|
Loading…
Add table
Add a link
Reference in a new issue