From 00d39f624555bba02d14783252e7cdb2d27e13cc Mon Sep 17 00:00:00 2001 From: Adar Nimrod <nimrod@shore.co.il> Date: Sat, 23 Oct 2021 19:29:44 +0300 Subject: [PATCH] Refactor. Merge the ci-templates and ci-images repositories. --- .pre-commit-config.yaml | 65 +++++++++++++++++++++++++++++++++------- README.md | 6 ++-- images/README.md | 3 ++ templates/README.md | 3 ++ templates/pre-commit.yml | 1 + 5 files changed, 65 insertions(+), 13 deletions(-) create mode 100644 images/README.md create mode 100644 templates/README.md diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8027248..0288a39 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,33 +1,78 @@ --- repos: - - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v3.4.0 + - repo: https://github.com/pre-commit/pre-commit-hooks.git + rev: v4.0.1 hooks: + - id: check-added-large-files + - id: check-executables-have-shebangs + - id: check-json - id: check-merge-conflict + - id: check-shebang-scripts-are-executable + - id: check-symlinks + - id: check-toml + - id: check-xml + - id: check-yaml + - id: detect-private-key + - id: end-of-file-fixer - id: trailing-whitespace + exclude: \.diff$ - - repo: https://github.com/adrienverge/yamllint - rev: v1.25.0 + - repo: https://github.com/codespell-project/codespell.git + rev: v2.1.0 hooks: - - id: yamllint + - id: codespell + + - repo: https://github.com/Yelp/detect-secrets.git + rev: v1.1.0 + hooks: + - id: detect-secrets + + - repo: https://gitlab.com/devopshq/gitlab-ci-linter.git + rev: v1.0.4 + hooks: + - id: gitlab-ci-linter + args: + - "--server" + - https://git.shore.co.il - - repo: https://github.com/amperser/proselint/ + - repo: https://github.com/amperser/proselint.git rev: 0.10.2 hooks: - id: proselint types: [plain-text] exclude: LICENSE - - repo: https://github.com/Yelp/detect-secrets - rev: v0.14.3 + - repo: https://github.com/adrienverge/yamllint.git + rev: v1.26.3 hooks: - - id: detect-secrets + - id: yamllint - repo: https://github.com/executablebooks/mdformat.git - rev: 0.7.9 + rev: 0.7.10 hooks: - id: mdformat + - repo: https://github.com/pre-commit/pre-commit.git + rev: v2.15.0 + hooks: + - id: validate_manifest + + - repo: https://git.shore.co.il/nimrod/pre-commit-hooks.git + rev: v0.2.0 + hooks: + - id: shell-validate + - id: docker-compose + + - repo: https://github.com/shellcheck-py/shellcheck-py.git + rev: v0.7.2.1 + hooks: + - id: shellcheck + + - repo: https://github.com/AleksaC/hadolint-py.git + rev: v2.1.0 + hooks: + - id: hadolint + - repo: https://gitlab.com/devopshq/gitlab-ci-linter rev: v1.0.3 hooks: diff --git a/README.md b/README.md index ba1a715..80031a4 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# CI templates +# CI Stuff -[](https://git.shore.co.il/shore/ci-templates/-/commits/master) +[](https://git.shore.co.il/shore/ci-stuff/-/commits/master) -GitLab CI templates. +GitLab CI templates and images. ## License diff --git a/images/README.md b/images/README.md new file mode 100644 index 0000000..0f68dcd --- /dev/null +++ b/images/README.md @@ -0,0 +1,3 @@ +# CI container images + +Containerfiles for building container images for CI. diff --git a/templates/README.md b/templates/README.md new file mode 100644 index 0000000..f1d8040 --- /dev/null +++ b/templates/README.md @@ -0,0 +1,3 @@ +# GitLab CI templates + +See https://docs.gitlab.com/ee/development/cicd/templates.html . diff --git a/templates/pre-commit.yml b/templates/pre-commit.yml index b669453..40f1090 100644 --- a/templates/pre-commit.yml +++ b/templates/pre-commit.yml @@ -1,6 +1,7 @@ --- pre-commit: stage: .pre + needs: [] image: registry.shore.co.il/ci-images:pre-commit tags: [ns4.shore.co.il] rules: -- GitLab