Merged in ITPLT-3977-add-direnv-pre-commit-to-dc-deployments-automation (pull request #215)

ITPLT-3977 add direnv pre commit to dc deployments automation

Approved-by: Lee Goolsbee
This commit is contained in:
Geoff Jacobs
2024-08-19 22:50:49 +00:00
15 changed files with 546 additions and 428 deletions

View File

@@ -8,4 +8,5 @@ skip_list:
- name[casing] # so many of our task names aren't capitalized - name[casing] # so many of our task names aren't capitalized
- name[missing] # some tasks have no name - name[missing] # some tasks have no name
- risky-file-permissions - risky-file-permissions
- var-naming[no-role-prefix] # many, many warnings
- yaml # many, many warnings - yaml # many, many warnings

3
.envrc Normal file
View File

@@ -0,0 +1,3 @@
layout pipenv
pre-commit install
ansible-galaxy install -r requirements.yml

3
.gitignore vendored
View File

@@ -5,7 +5,8 @@ __pycache__
*.pyc *.pyc
/.venv /.venv
\#*\# \#*\#
.envrc .direnv
.idea .idea
.vscode .vscode
ansible_collections ansible_collections
.DS_Store

View File

@@ -19,9 +19,10 @@ repos:
- --template={} - --template={}
- --pattern=[a-zA-Z0-9]{1,10}-[0-9]{1,6} - --pattern=[a-zA-Z0-9]{1,10}-[0-9]{1,6}
- repo: https://github.com/ansible/ansible-lint.git - repo: https://github.com/ansible/ansible-lint.git
rev: v24.2.2 rev: v24.7.0
hooks: hooks:
- id: ansible-lint - id: ansible-lint
stages: [manual]
additional_dependencies: additional_dependencies:
- . - .
- ansible-core==2.16.6 - ansible-core==2.16.6

View File

@@ -19,6 +19,7 @@ ansible-compat = "==4.1.11"
docker = "==7.0.0" docker = "==7.0.0"
pytest = "*" pytest = "*"
pytest-testinfra = "*" pytest-testinfra = "*"
pre-commit = "*"
[requires] [requires]
python_version = "3" python_version = "3"

849
Pipfile.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -11,12 +11,22 @@ options:
definitions: definitions:
caches: caches:
ansible-collections: ansible_collections ansible-collections: ansible_collections
pre-commit: ~/.cache/pre-commit
services: services:
docker: docker:
memory: 4096 memory: 4096
pipelines: pipelines:
default: default:
- step:
name: Pre-commit
image: python:3.9
caches:
- pre-commit
script:
- apt update && apt install -y pipenv
- pipenv sync --dev
- pipenv run pre-commit run --all-files
- step: - step:
name: Pre Parallelization stage name: Pre Parallelization stage
script: script: