From 17c78e940d035f1402eedc9e53fdc0c752181cc4 Mon Sep 17 00:00:00 2001 From: Iain Sproat <68657+iainsproat@users.noreply.github.com> Date: Wed, 8 Feb 2023 17:48:24 +0000 Subject: [PATCH] feat(pre-commit): adds pre-commit, and fixes based on pre-commit feedback --- .github/workflows/close-issue.yml | 2 +- .pre-commit-config.yaml | 39 +++++++++++++++++++++++++++++++ .prettierignore | 2 ++ .prettierrc | 11 +++++++++ README.md | 22 ++++++++--------- charts/.gitkeep | 0 6 files changed, 64 insertions(+), 12 deletions(-) create mode 100644 .pre-commit-config.yaml create mode 100644 .prettierignore create mode 100644 .prettierrc create mode 100644 charts/.gitkeep diff --git a/.github/workflows/close-issue.yml b/.github/workflows/close-issue.yml index 30e1ebc..ff7c6ef 100644 --- a/.github/workflows/close-issue.yml +++ b/.github/workflows/close-issue.yml @@ -9,4 +9,4 @@ jobs: uses: specklesystems/github-actions/.github/workflows/project-add-issue.yml@main secrets: inherit with: - issue-id: ${{ github.event.issue.node_id }} \ No newline at end of file + issue-id: ${{ github.event.issue.node_id }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..b07461f --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,39 @@ +repos: + - repo: https://github.com/pre-commit/mirrors-prettier + rev: 'v3.0.0-alpha.4' + hooks: + - id: prettier + + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: 'v4.4.0' + hooks: + - id: check-yaml + exclude: 'deploy/helm' + - id: check-merge-conflict + - id: check-executables-have-shebangs + - id: check-shebang-scripts-are-executable + - id: check-symlinks + - id: check-vcs-permalinks + - id: trailing-whitespace + - id: end-of-file-fixer + exclude: 'deploy/helm/README.md' + + - repo: https://github.com/syntaqx/git-hooks + rev: 'v0.0.17' + hooks: + - id: circleci-config-validate + + - repo: https://github.com/Jarmos-san/shellcheck-precommit + rev: 'v0.2.0' + hooks: + - id: shellcheck-system + + - repo: https://github.com/norwoodj/helm-docs + rev: v1.11.0 + hooks: + - id: helm-docs + args: + - --chart-search-root=charts + +ci: + autoupdate_schedule: weekly diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..d3a4e7e --- /dev/null +++ b/.prettierignore @@ -0,0 +1,2 @@ +.github +charts diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..1a1ea1a --- /dev/null +++ b/.prettierrc @@ -0,0 +1,11 @@ +{ + "trailingComma": "none", + "tabWidth": 2, + "semi": false, + "endOfLine": "auto", + "bracketSpacing": true, + "vueIndentScriptAndStyle": false, + "htmlWhitespaceSensitivity": "ignore", + "printWidth": 88, + "singleQuote": true +} diff --git a/README.md b/README.md index ce9edf4..601bc9c 100644 --- a/README.md +++ b/README.md @@ -23,20 +23,20 @@ Comprehensive developer and user documentation can be found in our: 1. Edit the file `./example/values.yaml` to include your API key for seq. 1. Run the following command to install the helm chart in your kubernetes cluster. Note that this will create a new namespace named `seq-input-gelf`: - ```shell - helm upgrade seq-input-gelf \ - ./charts/seq-input-gelf \ - --create-namespace \ - --namespace seq-input-gelf \ - --install \ - --values ./example/values.yaml - ``` + ```shell + helm upgrade seq-input-gelf \ + ./charts/seq-input-gelf \ + --create-namespace \ + --namespace seq-input-gelf \ + --install \ + --values ./example/values.yaml + ``` 1. Verify that the deployment has successfully [rolled out](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#deployment-status): - ```shell - kubectl rollout status deployment/seq-input-gelf --namespace seq-input-gelf - ``` + ```shell + kubectl rollout status deployment/seq-input-gelf --namespace seq-input-gelf + ``` ### Developing & Debugging diff --git a/charts/.gitkeep b/charts/.gitkeep new file mode 100644 index 0000000..e69de29