Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
Commit 7ce5c4ff authored by Christophe Chaudier's avatar Christophe Chaudier :rocket:
Browse files

Merge branch '33-ci-add-more-lint' into 'main'

Resolve "ci: add more lint"

Closes #33

See merge request !21
parents 6a4cbe1c 954caf83
No related branches found
No related tags found
1 merge request!21Resolve "ci: add more lint"
Pipeline #5501 passed with warnings
# Vault password file
.vault_pass
# Ansible
.ansible/
*.retry
.roles_requirements/
.lint_rules/
# Terraform
.terraform/
terraform.tfstate.d/
*.tfstate
*.tfstate.backup
terraform.tfvars
env.vault
env.d/
terraform/create_state_bucket/terraform.tf
# Logs
*.log
*.history
...@@ -32,3 +32,31 @@ include: ...@@ -32,3 +32,31 @@ include:
ansible-syntax-check: ansible-syntax-check:
rules: rules:
- when: never - when: never
# For Ansible Galaxy Scoring
# https://galaxy.ansible.com/docs/contributing/content_scoring.html
yaml-lint:
image:
name: cytopia/yamllint:1.26
entrypoint: ["/bin/ash", "-c"]
stage: lint
before_script:
- yamllint --version
script:
- ls **/*.yml
- yamllint -c .yamllint.yml -f colored .
rules:
- if: '$CI_PIPELINE_SOURCE == "push"'
changes:
- "**/*.yml"
galaxy-lint:
extends: ansible-lint
before_script:
- ansible-lint --version
script:
- ansible-lint **/*.yml
rules:
- if: '$CI_PIPELINE_SOURCE == "push"'
changes:
- "**/*.yml"
---
# https://github.com/ansible/galaxy/blob/devel/galaxy/importer/linters/yamllint.yaml
# Based on ansible-lint config
extends: default
rules:
braces: {max-spaces-inside: 1, level: error}
brackets: {max-spaces-inside: 1, level: error}
colons: {max-spaces-after: -1, level: error}
commas: {max-spaces-after: -1, level: error}
comments: disable
comments-indentation: disable
document-start: disable
empty-lines: {max: 3, level: error}
hyphens: {level: error}
indentation: disable
key-duplicates: enable
line-length: disable
new-line-at-end-of-file: disable
new-lines: {type: unix}
trailing-spaces: disable
truthy: disable
...@@ -14,7 +14,7 @@ and the commits message folow the [Conventional Commits](https://www.conventiona ...@@ -14,7 +14,7 @@ and the commits message folow the [Conventional Commits](https://www.conventiona
### Changed ### Changed
- This role is now divided into four roles: `ynh_setup`, `ynh_config`, `ynh_apps`, `ynh_backup`. Each role has its own README so you can easily navigate between them and understand their purpose. - This role is now divided into four roles: `ynh_setup`, `ynh_config`, `ynh_apps`, `ynh_backup`. Each role has its own README so you can easily navigate between them and understand their purpose.
## [0.2.0] - date to be defined before release ## [0.2.0] - 2022-03-31
### Added ### Added
- Creation of the CHANGELOG. - Creation of the CHANGELOG.
- CI: Ansible galaxy lint - CI: Ansible galaxy lint
......
Pipfile 0 → 100644
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
ansible = "==4"
ansible-lint = "==5.4.0"
yamllint = "==1.26"
[requires]
python_version = "3.8"
[dev-packages]
This diff is collapsed.
...@@ -32,4 +32,3 @@ ...@@ -32,4 +32,3 @@
loop_control: loop_control:
loop_var: ynh_app loop_var: ynh_app
when: ynh_app.label not in ynh_installed_apps.values() when: ynh_app.label not in ynh_installed_apps.values()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment