Skip to content
Snippets Groups Projects
Commit 72043620 authored by nimrod's avatar nimrod
Browse files

pre-commit from templates.

- Use common pre-commit snippet for Docker projects.
- Use GitLab CI template for pre-commit job.
parent 2f890759
No related branches found
No related tags found
No related merge requests found
---
include:
- project: shore/ci-templates
file: templates/pre-commit.yml
image: adarnimrod/ci-images:docker
stages:
......@@ -6,20 +10,6 @@ stages:
- build
- run
pre-commit:
stage: test
image: adarnimrod/ci-images:pre-commit
variables:
XDG_CACHE_HOME: "$CI_PROJECT_DIR/.cache"
# Disabled until https://github.com/pre-commit/pre-commit/issues/1387 is
# resolved.
SKIP: "hadolint,docker-compose"
script:
- pre-commit run --all-files
cache:
paths:
- .cache/
build:
stage: build
tags: ["host01.shore.co.il"]
......
# vim:ff=unix ts=2 sw=2 ai expandtab
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
- repo: https://github.com/pre-commit/pre-commit-hooks.git
rev: v3.4.0
hooks:
- id: check-added-large-files
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: detect-private-key
- id: check-symlinks
- id: trailing-whitespace
- repo: https://github.com/Yelp/detect-secrets
rev: v0.14.3
hooks:
- id: detect-secrets
- repo: https://github.com/adrienverge/yamllint
rev: v1.17.0
rev: v1.25.0
hooks:
- id: yamllint
......@@ -21,13 +26,23 @@ repos:
types: [plain-text]
exclude: LICENSE
- repo: https://github.com/Yelp/detect-secrets
rev: v0.13.0
- repo: https://github.com/executablebooks/mdformat.git
rev: 0.5.3
hooks:
- id: detect-secrets
- id: mdformat
- repo: https://git.shore.co.il/nimrod/shell-pre-commit.git
rev: v0.6.0
hooks:
- id: shell-lint
- repo: https://github.com/shellcheck-py/shellcheck-py.git
rev: v0.7.1.1
hooks:
- id: shellcheck
- repo: https://git.shore.co.il/nimrod/docker-pre-commit.git/
rev: v0.3.0
hooks:
- id: docker-compose
- id: hadolint
- id: docker-compose
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