From d68b177c2c5901bc1cd315a2e293249dde6d3c10 Mon Sep 17 00:00:00 2001 From: Adar Nimrod <nimrod@shore.co.il> Date: Mon, 11 Jan 2021 10:20:04 +0200 Subject: [PATCH] CI and pre-commit. --- .gitlab-ci.yml | 19 ++++++++++++++++ .pre-commit-config.yaml | 48 +++++++++++++++++++++++++++++++++++++++++ README.md | 2 ++ 3 files changed, 69 insertions(+) create mode 100644 .gitlab-ci.yml create mode 100644 .pre-commit-config.yaml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..9bce4b2 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,19 @@ +--- +include: + - project: shore/ci-templates + file: templates/pre-commit.yml + - project: shore/ci-templates + file: templates/docker.yml + +stages: + - test + - build + - deploy + +build: + extends: .compose-build + tags: [ns4.shore.co.il] + +run: + extends: .compose-run + tags: [ns4.shore.co.il] diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..13d68fd --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,48 @@ +--- +repos: + - 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: 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.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 diff --git a/README.md b/README.md index bbeb6a4..1b2f5b0 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Docker Registry +[](https://git.shore.co.il/shore/registry-docker/-/commits/master) + > Run a Docker image registry using Docker. ## License -- GitLab