Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pre-commit: chartpress --reset on Chart.yaml/values.yaml changes #1970

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ jobs:
with:
python-version: '3.7'

- uses: pre-commit/action@v2.0.0

- name: Install dependencies
run: |
. ci/common
setup_helm
KUBEVAL_VERSION=0.15.0 setup_kubeval
pip install yamllint
pip install chartpress yamllint

- uses: pre-commit/action@v2.0.0

- name: Lint and validate
# NOTE: Kubernetes resource validation can only be done against
Expand Down
18 changes: 18 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,28 @@
# pre-commit is a tool to automatically do tasks before committing.
#
# Config reference: https://pre-commit.com/#pre-commit-configyaml---top-level
#
repos:
# Python code formatting
- repo: https://github.com/ambv/black
rev: 20.8b1
hooks:
- id: black
args: [--target-version=py36]

# Shell script code formatting
- repo: https://github.com/lovesegfault/beautysh
rev: 6.0.1
hooks:
- id: beautysh

# Reset changes by chartpress
- repo: local
hooks:
- id: chartpress
name: chartpress --reset
files: jupyterhub/Chart.yaml|jupyterhub/values.yaml
description: Run `chartpress --reset` to clean up helm charts before committing.
entry: chartpress --reset
language: system
pass_filenames: false