From 635113c9f617301741f226d2499da9846186470e Mon Sep 17 00:00:00 2001 From: Devin Buhl Date: Fri, 30 Jun 2023 09:09:53 -0400 Subject: [PATCH] feat: remove pre-commit from template (#810) --- .github/renovate.json5 | 4 ---- .pre-commit-config.yaml | 10 ---------- .taskfiles/PrecommitTasks.yml | 19 ------------------- .yamllint.yaml | 17 ----------------- README.md | 20 ++------------------ Taskfile.yml | 4 ---- ansible.cfg | 2 +- 7 files changed, 3 insertions(+), 73 deletions(-) delete mode 100644 .pre-commit-config.yaml delete mode 100644 .taskfiles/PrecommitTasks.yml delete mode 100644 .yamllint.yaml diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 66be8899..a6b9e572 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -6,7 +6,6 @@ ":disableRateLimiting", ":dependencyDashboard", ":semanticCommits", - ":enablePreCommit", ":automergeDigest", ":automergeBranch", "github>onedr0p/flux-cluster-template//.github/renovate/autoMerge.json5", @@ -21,9 +20,6 @@ "suppressNotifications": ["prIgnoreNotification"], "rebaseWhen": "conflicted", "schedule": ["every saturday"], - "pre-commit": { - "enabled": true - }, "flux": { "fileMatch": ["kubernetes/.+\\.ya?ml$"] }, diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml deleted file mode 100644 index 9c4b7801..00000000 --- a/.pre-commit-config.yaml +++ /dev/null @@ -1,10 +0,0 @@ ---- -fail_fast: false -repos: - - repo: https://github.com/adrienverge/yamllint - rev: v1.32.0 - hooks: - - args: - - --config-file - - .yamllint.yaml - id: yamllint diff --git a/.taskfiles/PrecommitTasks.yml b/.taskfiles/PrecommitTasks.yml deleted file mode 100644 index 52c27a95..00000000 --- a/.taskfiles/PrecommitTasks.yml +++ /dev/null @@ -1,19 +0,0 @@ ---- -version: "3" - -tasks: - - init: - desc: Initialize pre-commit hooks - cmds: - - pre-commit install --install-hooks - - run: - desc: Run pre-commit - cmds: - - pre-commit run --all-files - - update: - desc: Update pre-commit hooks - cmds: - - pre-commit autoupdate diff --git a/.yamllint.yaml b/.yamllint.yaml deleted file mode 100644 index 76f1e8f9..00000000 --- a/.yamllint.yaml +++ /dev/null @@ -1,17 +0,0 @@ ---- -ignore: | - *.sops.* -extends: default -rules: - truthy: - allowed-values: ["true", "false", "on"] - comments: - min-spaces-from-content: 1 - line-length: disable - braces: - min-spaces-inside: 0 - max-spaces-inside: 1 - brackets: - min-spaces-inside: 0 - max-spaces-inside: 0 - indentation: enable diff --git a/README.md b/README.md index 4420650d..8a830c74 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ Clone **your new repo** to you local workstation and `cd` into it. 1. Install the following CLI tools on your workstation, if you are **NOT** using [Homebrew](https://brew.sh/) on MacOS or Linux **ignore** steps 4 and 5. - - Required: [age](https://github.com/FiloSottile/age), [ansible](https://www.ansible.com), [flux](https://toolkit.fluxcd.io/), [weave-gitops](https://docs.gitops.weave.works/docs/installation/weave-gitops/), [cloudflared](https://github.com/cloudflare/cloudflared), [cilium-cli](https://github.com/cilium/cilium-cli), [go-task](https://github.com/go-task/task), [direnv](https://github.com/direnv/direnv), [ipcalc](http://jodies.de/ipcalc), [jq](https://stedolan.github.io/jq/), [kubectl](https://kubernetes.io/docs/tasks/tools/), [python-pip3](https://pypi.org/project/pip/), [pre-commit](https://github.com/pre-commit/pre-commit), [sops v3](https://github.com/mozilla/sops), [yq v4](https://github.com/mikefarah/yq) + - Required: [age](https://github.com/FiloSottile/age), [ansible](https://www.ansible.com), [flux](https://toolkit.fluxcd.io/), [weave-gitops](https://docs.gitops.weave.works/docs/installation/weave-gitops/), [cloudflared](https://github.com/cloudflare/cloudflared), [cilium-cli](https://github.com/cilium/cilium-cli), [go-task](https://github.com/go-task/task), [direnv](https://github.com/direnv/direnv), [ipcalc](http://jodies.de/ipcalc), [jq](https://stedolan.github.io/jq/), [kubectl](https://kubernetes.io/docs/tasks/tools/), [python-pip3](https://pypi.org/project/pip/), [sops v3](https://github.com/mozilla/sops), [yq v4](https://github.com/mikefarah/yq) - Recommended: [helm](https://helm.sh/), [kustomize](https://github.com/kubernetes-sigs/kustomize), [stern](https://github.com/stern/stern), [yamllint](https://github.com/adrienverge/yamllint) @@ -102,22 +102,6 @@ Clone **your new repo** to you local workstation and `cd` into it. task init ``` -### ⚠️ pre-commit - -It is advisable to install [pre-commit](https://pre-commit.com/) and the pre-commit hooks that come with this repository. - -1. Enable Pre-Commit - - ```sh - task precommit:init - ``` - -2. Update Pre-Commit, though it will occasionally make mistakes, so verify its results. - - ```sh - task precommit:update - ``` - ### 🔐 Setting up Age 📍 Here we will create a Age Private and Public key. Using [SOPS](https://github.com/mozilla/sops) with [Age](https://github.com/FiloSottile/age) allows us to encrypt secrets and use them in Ansible and Flux. @@ -463,7 +447,7 @@ If nothing is working, that is expected. This is DNS after all! ### 🤖 Renovatebot -[Renovatebot](https://www.mend.io/free-developer-tools/renovate/) will scan your repository and offer PRs when it finds dependencies out of date. Common dependencies it will discover and update are Flux, Ansible Galaxy Roles, Terraform Providers, Kubernetes Helm Charts, Kubernetes Container Images, Pre-commit hooks updates, and more! +[Renovatebot](https://www.mend.io/free-developer-tools/renovate/) will scan your repository and offer PRs when it finds dependencies out of date. Common dependencies it will discover and update are Flux, Ansible Galaxy Roles, Terraform Providers, Kubernetes Helm Charts, Kubernetes Container Images, and more! The base Renovate configuration provided in your repository can be view at [.github/renovate.json5](https://github.com/onedr0p/flux-cluster-template/blob/main/.github/renovate.json5). If you notice this only runs on weekends and you can [change the schedule to anything you want](https://docs.renovatebot.com/presets-schedule/) or simply remove it. diff --git a/Taskfile.yml b/Taskfile.yml index b4b4ad40..81d32fc6 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -14,7 +14,6 @@ env: includes: ansible: .taskfiles/AnsibleTasks.yml cluster: .taskfiles/ClusterTasks.yml - precommit: .taskfiles/PrecommitTasks.yml tasks: init: @@ -40,12 +39,9 @@ tasks: jq kubernetes-cli kustomize - pre-commit - prettier sops stern weaveworks/tap/gitops - yamllint yq verify: diff --git a/ansible.cfg b/ansible.cfg index d7f3ef6d..d7864b5a 100644 --- a/ansible.cfg +++ b/ansible.cfg @@ -22,7 +22,7 @@ host_key_checking = False vars_plugins_enabled = host_group_vars,community.sops.sops [inventory] -unparsed_is_failed = true +unparsed_is_failed = True [privilege_escalation] become = True