Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/srz-zumix/jenkinsfile-shellcheck
shellcheck for Jenkinsfile sh block
https://github.com/srz-zumix/jenkinsfile-shellcheck
github-actions jenkins shell shellcheck
Last synced: 16 days ago
JSON representation
shellcheck for Jenkinsfile sh block
- Host: GitHub
- URL: https://github.com/srz-zumix/jenkinsfile-shellcheck
- Owner: srz-zumix
- License: mit
- Created: 2022-01-26T02:27:49.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-08-30T05:41:47.000Z (5 months ago)
- Last Synced: 2025-01-03T03:16:38.305Z (about 1 month ago)
- Topics: github-actions, jenkins, shell, shellcheck
- Language: Groovy
- Homepage:
- Size: 21.5 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# jenkinsfile-shellcheck
shellcheck for Jenkinsfile sh block
## How to use
```sh
usage: jenkinsfile-shellcheck [options]
-h,--help usage information
-i,--input input files (default: Jenkinsfile)
--no-expand-gstring do not expand GString valuesshellcheck options can be written after '--'.
e.g. groovy jenkinsfile-shellcheck.groovy -- -e SC2154
```## GitHub Actions
### Inputs
#### `github_token`
**Required**. Must be in form of `github_token: ${{ secrets.github_token }}`'.
#### `shellcheck_flags`
Optional. shellcheck options.
#### `level`
Optional. Report level for reviewdog [info,warning,error].
It's same as `-level` flag of reviewdog.
Default is `error`.#### `reporter`
Reporter of reviewdog command [github-pr-check,github-pr-review].
Default is `github-pr-check`.#### `tool_name`
Optional. Tool name to use for reviewdog reporter. Useful when running multiple actions with different config.
#### `exclude`
Optional. List of folders and files to exclude from checking.
#### `filter_mode`
Optional. Filtering mode for the reviewdog command [added, diff_context, file, nofilter]. Default is added.
#### `fail_on_error`
Optional. Exit code for reviewdog when errors are found [true, false] Default is false.
#### `reviewdog_flags`
Optional. Additional reviewdog flags.
### Example Usage
```yml
name: Reviewdog
on: [pull_request]jobs:
jenkinsfile-shellcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: srz-zumix/jenkinsfile-shellcheck@v1
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-review
shellcheck_flags: "--exclude SC2086" # Optional
```