diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 23796b52625068807a771bcd515d96cc3905ef3e..f92da7b142f506a53baa2e4028ac3e501c5919d9 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,46 +1,4 @@
---
-image: adarnimrod/ci-images:docker
-
-stages:
- - test
- - 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"]
- variables:
- COMPOSE_DOCKER_CLI_BUILD: "1"
- DOCKER_BUILDKIT: "1"
- script:
- - docker-compose build --no-cache --pull
- - docker-compose pull --quiet
-
-run:
- stage: run
- tags: ["host01.shore.co.il"]
- when: manual
- script:
- - docker-compose up --detach --remove-orphans
- # yamllint disable rule:line-length
- - |
- for i in $(seq 12)
- do
- docker container inspect --format '{{ .State.Health.Status }}' $(docker-compose ps -q) | grep -v '^healthy$' || break
- sleep 10
- done
- ! docker container inspect --format '{{ .State.Health.Status }}' $(docker-compose ps -q) | grep -v '^healthy$'
+include:
+ - project: shore/ci-templates
+ file: templates/pre-commit.yml
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 3371e0e9d2f08ea23738a8fc62203d1790d267d6..684cbe0bc67d6e2fed6c5e60c4faf1963e21ca4b 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -1,31 +1,50 @@
-# 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
exclude: \.diff$
+
+ - repo: https://github.com/Yelp/detect-secrets
+ rev: v0.14.3
+ hooks:
+ - id: detect-secrets
+ exclude: \.diff$
+
- repo: https://github.com/adrienverge/yamllint
- rev: v1.17.0
+ rev: v1.25.0
hooks:
- id: yamllint
+
- repo: https://github.com/amperser/proselint/
rev: 0.10.2
hooks:
- id: proselint
types: [plain-text]
exclude: LICENSE
+
+ - repo: https://github.com/executablebooks/mdformat.git
+ rev: 0.5.3
+ hooks:
+ - 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: hadolint
- id: docker-compose
- - repo: https://github.com/Yelp/detect-secrets
- rev: v0.13.0
- hooks:
- - id: detect-secrets
- exclude: \.diff$
diff --git a/README.md b/README.md
index ed2c2cb6d5d0c6c257e595c45cf3b463293bea95..a085f88626b3d95c552e0fe534be54917705d200 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,7 @@
# cgit
+[![coverage report](https://git.shore.co.il/shore/cgit-docker/badges/master/coverage.svg)](https://git.shore.co.il/shore/cgit-docker/-/commits/master)
+
> cgit Docker image.
## Usage
@@ -24,7 +26,7 @@ This software is licensed under the MIT license (see `LICENSE.txt`).
## Author Information
-Nimrod Adar, [contact me](mailto:nimrod@shore.co.il) or visit my [website](
-https://www.shore.co.il/). Patches are welcome via [`git send-email`](
-http://git-scm.com/book/en/v2/Git-Commands-Email). The repository is located
-at: .
+Nimrod Adar, [contact me](mailto:nimrod@shore.co.il) or visit my
+[website](https://www.shore.co.il/). Patches are welcome via
+[`git send-email`](http://git-scm.com/book/en/v2/Git-Commands-Email). The repository
+is located at: .