Skip to content
Snippets Groups Projects
Commit 18459f0d authored by Thomas Schneider's avatar Thomas Schneider
Browse files

Initial import

parents
Branches main
No related tags found
No related merge requests found
---
extends: default
rules:
document-start:
level: error
empty-lines:
max: 1
empty-values: enable
octal-values: enable
truthy:
level: error
COPYING 0 → 100644
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. You just DO WHAT THE FUCK YOU WANT TO.
# GitLab CI Components for Ansible
Use [ansible-lint](https://ansible.readthedocs.io/projects/lint/) and other
linters to check your Ansible repositories in GitLab CI.
## Usage
Add to your `.gitlab-ci.yml`:
```yaml
include:
- component: git.fsmpi.rwth-aachen.de/infra/ansible-shared/ci-components/default-ansible-lint@<VERSION>
```
where `<VERSION>` is the latest released tag or `main`.
### Inputs
| Input | Default value | Description |
|---------------------|---------------------------------|----------------------------------------|
| `job-name` | `test` | Name for the test job |
| `job-stage` | `test` | Stage to run the test job in |
| `alpine-imageimage` | `docker.io/library/alpine:3.20` | Container image of Alpine Linux to use |
---
spec:
inputs:
job-name:
description: 'Name for the test job (default: "test")'
default: test
job-stage:
description: 'Stage to run the test job in (default: "test")'
default: test
alpine-image:
description: >-
Container image of Alpine Linux to use (default:
"docker.io/library/alpine:3.20")
default: docker.io/library/alpine:3.20
---
"$[[ inputs.job-name ]]":
stage: "$[[ inputs.job-stage ]]"
image: "$[[ inputs.alpine-image ]]"
before_script:
- apk --no-cache add ansible ansible-lint ripgrep black
- export LANG=en_US.UTF-8
- chmod o-w .
- ansible --version
- ansible-lint --version
script:
- >-
ansible-lint
--format codeclimate
> codeclimate.json
- "! rg --fixed-strings 'passwordstore' ./*/templates"
artifacts:
reports:
codequality: codeclimate.json
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment