diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml index b678300..92dff08 100644 --- a/bitbucket-pipelines.yml +++ b/bitbucket-pipelines.yml @@ -11,12 +11,22 @@ options: definitions: caches: ansible-collections: ansible_collections + pre-commit: ~/.cache/pre-commit services: docker: memory: 4096 pipelines: 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: name: Pre Parallelization stage script: diff --git a/pipeline_generator/templates/bitbucket-pipelines.yml.j2 b/pipeline_generator/templates/bitbucket-pipelines.yml.j2 index 46f6e9c..c9c3208 100644 --- a/pipeline_generator/templates/bitbucket-pipelines.yml.j2 +++ b/pipeline_generator/templates/bitbucket-pipelines.yml.j2 @@ -11,12 +11,22 @@ options: definitions: caches: ansible-collections: ansible_collections + pre-commit: ~/.cache/pre-commit services: docker: memory: 4096 pipelines: 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: name: Pre Parallelization stage script: