Skip to content

Commit da22e7c

Browse files
authored
Merge pull request #618 from redhat-cop/precommit-lineend
added pre-commit for end-of-file-fixer and trailing-whitespace
2 parents 0aece58 + 3040cd8 commit da22e7c

File tree

199 files changed

+304
-277
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

199 files changed

+304
-277
lines changed

.github/actions/setup-kind-cluster-for-helm-chart-testing/action.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ inputs:
66
description: helm version to install
77
required: true
88
default: 'v3.16.3'
9-
9+
1010
# renovate: datasource=github-tags depName=python/cpython
1111
python-version:
1212
description: python version to install
@@ -36,7 +36,7 @@ inputs:
3636
required: false
3737
default: 'registryuser1'
3838

39-
local-registry-password:
39+
local-registry-password:
4040
description: local authenticated registry password
4141
required: false
4242
default: 'registrypassword1'
@@ -70,7 +70,7 @@ runs:
7070
version: ${{ inputs.kind-version }}
7171
config: _test/kind-config.yaml
7272

73-
# for helm charts we are testing that require installing operators
73+
# for helm charts we are testing that require installing operators
7474
- name: Setup kind cluster - Install OLM 🧰
7575
env:
7676
OLM_VERSION: ${{ inputs.olm-version }}
@@ -121,7 +121,7 @@ runs:
121121
--set registryPassword=${LOCAL_REGISTRY_PASSWORD} \
122122
--set registryIngressHost=${LOCAL_REGISTRY_URI}
123123
if: inputs.local-registry-enabled == 'true'
124-
124+
125125
# copy images needed by CT tests that use private registry to the private registry
126126
- name: Setup kind cluster - Copy images into private registry 🔺
127127
env:

.github/renovate-bump.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ for chart in ${changed}; do
1616
echo
1717
done
1818

19-
echo "CHARTS=$(echo ${CHARTS_CHANGED[*]})" >> $GITHUB_OUTPUT
19+
echo "CHARTS=$(echo ${CHARTS_CHANGED[*]})" >> $GITHUB_OUTPUT

.github/workflows/conftest.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Validate
22

3-
on:
3+
on:
44
push:
55
paths-ignore:
66
- '.github/**'

.github/workflows/install-integration-tests-operators-installer.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
3030
with:
3131
fetch-depth: 0
32-
32+
3333
# set up kind cluster (using re-usable local composite action)
3434
- name: Setup Kind Cluster for Helm Chart Testing 🧰
3535
uses: ./.github/actions/setup-kind-cluster-for-helm-chart-testing
@@ -93,7 +93,7 @@ jobs:
9393
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
9494
with:
9595
fetch-depth: 0
96-
96+
9797
# set up kind cluster (using re-usable local composite action)
9898
- name: Setup Kind Cluster for Helm Chart Testing 🧰
9999
uses: ./.github/actions/setup-kind-cluster-for-helm-chart-testing

.github/workflows/install-unit-test.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626

2727
- name: Setup chart-testing 🧰
2828
uses: helm/chart-testing-action@0d28d3144d3a25ea2cc349d6e59901c4ff469b3b # v2.7.0
29-
29+
3030
- name: Find changed Charts 🔎
3131
id: changed-charts
3232
run: |
@@ -35,7 +35,7 @@ jobs:
3535
if [[ -n "$changed" ]]; then
3636
echo "changed=true" >> $GITHUB_OUTPUT
3737
fi
38-
38+
3939
# set up kind cluster (using re-usable local composite action)
4040
- name: Setup Kind Cluster for Helm Chart Testing 🧰
4141
uses: ./.github/actions/setup-kind-cluster-for-helm-chart-testing

.github/workflows/lint-test.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Lint Test
22

3-
on:
3+
on:
44
pull_request:
55
paths-ignore:
66
- '.github/**'
+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Run pre-commit
2+
3+
on:
4+
push:
5+
paths-ignore:
6+
- '.github/**'
7+
pull_request:
8+
paths-ignore:
9+
- '.github/**'
10+
11+
# Declare default permissions as read only.
12+
permissions: read-all
13+
14+
jobs:
15+
pre-commit:
16+
runs-on: ubuntu-latest
17+
name: pre-commit
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
21+
22+
- uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5
23+
with:
24+
python-version: 3.x
25+
26+
- name: Remove rh-pre-commit hook (requires VPN)
27+
uses: mikefarah/yq@8bf425b4d1344db7cd469a8d10a390876e0c77fd # v4.45.1
28+
with:
29+
cmd: yq -i 'del( .repos[] | select(.rev == "rh-pre-commit-*"))' .pre-commit-config.yaml
30+
31+
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
32+
33+
- name: Check if there are changes
34+
id: changes
35+
run: |
36+
git checkout HEAD -- .pre-commit-config.yaml
37+
echo "changed=$(git status --porcelain | wc -l)" >> $GITHUB_OUTPUT
38+
39+
- name: Fail if changes found
40+
if: steps.changes.outputs.changed >= 1
41+
run: |
42+
echo "Uncommitted changes exist. Failing."
43+
echo
44+
git status --porcelain
45+
exit 1

.github/workflows/release.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
for chart in ${packaged_charts}; do
5959
cosign sign-blob --yes ${chart}
6060
done
61-
61+
6262
echo "hashes=$(sha256sum ${packaged_charts} | base64 -w0)" >> "$GITHUB_OUTPUT"
6363
6464
outputs:

.gitleaks.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ description = "Global Allowlist"
55
paths = [
66
# Ignore all example certs
77
'renovate.json'
8-
]
8+
]

.pre-commit-config.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ repos:
55
- id: check-case-conflict
66
- id: check-shebang-scripts-are-executable
77
- id: check-json
8-
#- id: end-of-file-fixer
9-
#- id: trailing-whitespace
8+
- id: end-of-file-fixer
9+
- id: trailing-whitespace
1010
- repo: https://gitlab.cee.redhat.com/infosec-public/developer-workbench/tools.git
1111
rev: rh-pre-commit-2.3.2
1212
hooks:

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ helm install my-jenkins -f my-values.yaml redhat-cop/jenkins
4242

4343
## 🏃‍♂️💨 Chart linting
4444

45-
Before adding a chart to this repo, make sure there is no linting issues, otherwise the PR actions will fail.
45+
Before adding a chart to this repo, make sure there is no linting issues, otherwise the PR actions will fail.
4646
We use both the integrated [`helm lint`](https://helm.sh/docs/helm/helm_lint/) command and the [`chart testing`](https://github.com/helm/chart-testing/blob/master/doc/ct_lint.md) tool.
4747

4848
```bash

_test/bats-support-clone.bash

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ fi
66
if [[ ! -d "_test/test_helper/redhatcop-bats-library" ]]; then
77
# Download redhat-cop/bats-library dynamically so it doesnt need to be added into source
88
git clone https://github.com/redhat-cop/bats-library _test/test_helper/redhatcop-bats-library --depth 1
9-
fi
9+
fi

_test/private-registry/templates/Ingress.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,3 @@ spec:
1515
name: registry
1616
port:
1717
number: 5000
18-

_test/private-registry/templates/Secret_htpasswd.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,3 @@ kind: Secret
55
metadata:
66
name: htpasswd
77
namespace: registry
8-

_test/prow.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ run() {
2020
echo "Done testing all charts."
2121
}
2222

23-
run
23+
run

charts-we-like.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Below is a collection of charts we've used in the past that run on OpenShift with examples and the values to get up and going:
33

44
#### 🕵️‍♀️ Sealed Secrets
5-
[Sealed Secrets](https://github.com/bitnami-labs/sealed-secrets/tree/main/helm/sealed-secrets)
5+
[Sealed Secrets](https://github.com/bitnami-labs/sealed-secrets/tree/main/helm/sealed-secrets)
66
allows you to encrypt your K8s Secret into a SealedSecret, which is safe to store - even to a public repository:
77

88
```yaml
@@ -31,7 +31,7 @@ mysql:
3131
```
3232
3333
#### 🧪 Zalenium
34-
[Zalenium](https://github.com/zalando/zalenium/tree/master/charts/zalenium)
34+
[Zalenium](https://github.com/zalando/zalenium/tree/master/charts/zalenium)
3535
is a Selenium Grid deployment with on demand provisioning of the browsers for running your tests:
3636
3737
```yaml
@@ -71,7 +71,7 @@ route:
7171
```
7272
7373
#### 🦟 Hoverfly
74-
[Hoverfly](https://github.com/helm/charts/tree/master/incubator/hoverfly)
74+
[Hoverfly](https://github.com/helm/charts/tree/master/incubator/hoverfly)
7575
is a lightweight, open source API simulation tool. Using Hoverfly, you can create realistic simulations of the APIs your application depends on:
7676
7777
```yaml
@@ -87,7 +87,7 @@ openshift:
8787
```
8888
8989
#### 🗝 Vault
90-
[Vault](https://github.com/hashicorp/vault-helm.git)
90+
[Vault](https://github.com/hashicorp/vault-helm.git)
9191
helps you to store and control access to your tokens, passwords, certificates, API keys and other secrets.
9292
9393
```yaml
@@ -121,7 +121,7 @@ server:
121121
```
122122
123123
### 🚉 EAP
124-
[EAP](https://github.com/jbossas/eap-charts.git)
124+
[EAP](https://github.com/jbossas/eap-charts.git)
125125
is Red Hat's [Jakarta EE offering](https://www.redhat.com/en/technologies/jboss-middleware/application-platform)
126126
127127
```yaml
@@ -141,4 +141,4 @@ build:
141141
value: '-XX:MetaspaceSize=96m -XX:MaxMetaspaceSize=256m'
142142
deploy:
143143
replicas: 3
144-
```
144+
```

charts/ansible-automation-platform/.helmignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@
1919
.project
2020
.idea/
2121
*.tmproj
22-
ci/
22+
ci/

charts/ansible-automation-platform/.test.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,4 @@ case $1 in
7373
*)
7474
echo "Not an option"
7575
exit 1
76-
esac
76+
esac

charts/ansible-automation-platform/Chart.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ apiVersion: v2
22
appVersion: v2.0.2
33
description: A Helm chart for customizing the deployment of the Ansible Automation Platform Operator
44
name: ansible-automation-platform
5-
version: 0.0.7
5+
version: 0.0.8
66
home: https://github.com/redhat-cop/helm-charts
77
maintainers:
88
- name: paulbarfuss
99
- name: ecda909
1010
- name: jfilipcz
1111
dependencies:
1212
- name: operatorhub
13-
version: "0.0.10"
13+
version: "0.0.11"
1414
repository: https://redhat-cop.github.io/helm-charts
1515
condition: operatorhub.enabled

charts/ansible-automation-platform/templates/privileged-scc.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ subjects:
1313
- kind: ServiceAccount
1414
name: ansible-automation-platform
1515
namespace: {{ .Values.namespace }}
16-
{{- end }}
16+
{{- end }}

charts/ansible-automation-platform/templates/wait-for-crd.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
apiVersion: v1
44
kind: Pod
55
metadata:
6-
name: cluster-check
6+
name: cluster-check
77
annotations:
88
"helm.sh/hook": post-install,post-upgrade
99
"helm.sh/hook-weight": "-1"
1010
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
1111
namespace: {{ .Values.namespace }}
1212
spec:
1313
containers:
14-
- name: crd-check
14+
- name: crd-check
1515
image: quay.io/openshift/origin-cli:4.7
1616
imagePullPolicy: IfNotPresent
1717
command: ['sh', '-c', 'while [ true ]; do oc get crd automationcontrollers.automationcontroller.ansible.com; if [ $? -eq 0 ]; then break; fi ; sleep 5s; done']

charts/argocd-operator/.helmignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@
1919
.project
2020
.idea/
2121
*.tmproj
22-
ci/
22+
ci/

charts/argocd-operator/.test.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,4 @@ case $1 in
7373
*)
7474
echo "Not an option"
7575
exit 1
76-
esac
76+
esac

charts/argocd-operator/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
appVersion: v2.1.5
33
description: A Helm chart for customising the deployment of the ArgoCD Operator ⚓️
44
name: argocd-operator
5-
version: 1.2.1
5+
version: 1.2.2
66
home: https://github.com/redhat-cop/helm-charts
77
icon: https://cncf-branding.netlify.app/img/projects/argo/stacked/color/argo-stacked-color.png
88
maintainers:

charts/argocd-operator/templates/PrometheusSubscription.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ spec:
1212
source: community-operators
1313
sourceNamespace: openshift-marketplace
1414
startingCSV: {{ .Values.metrics.prometheus.version | quote }}
15-
{{- end }}
15+
{{- end }}

charts/argocd-operator/templates/Secret.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ stringData:
1515
username: {{ .username | quote }}
1616
sshPrivateKey: {{ .sshPrivateKey | quote }}
1717
{{- end }}
18-
{{- end }}
18+
{{- end }}

charts/argocd-operator/templates/crd-reader.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ subjects:
3333
- kind: ServiceAccount
3434
name: default
3535
namespace: {{ include "argocd-operator.ns" . }}
36-
{{- end }}
36+
{{- end }}

charts/argocd-operator/templates/helpers.tpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ Namespace from Values or Release Name
77
{{- else -}}
88
{{- .Release.Namespace | trunc 63 | trimSuffix "-" -}}
99
{{- end -}}
10-
{{- end -}}
10+
{{- end -}}

charts/argocd-operator/templates/wait-for-crd.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ spec:
1919
terminationGracePeriodSeconds: 0
2020
serviceAccount: default
2121
serviceAccountName: default
22-
{{- end }}
22+
{{- end }}

charts/bootstrap-project/.test.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,4 @@ case $1 in
6464
*)
6565
echo "Not an option"
6666
exit 1
67-
esac
67+
esac

charts/bootstrap-project/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
appVersion: "v0.0.1"
33
description: A Helm chart for deploying and managing Openshift projects 🦆
44
name: bootstrap-project
5-
version: 1.0.1
5+
version: 1.0.2
66
home: https://github.com/redhat-cop/helm-charts
77
icon: https://www.iconpacks.net/icons/1/free-rocket-icon-1206-thumb.png
88
maintainers:

charts/bootstrap-project/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ These values currently create `labs-ci-cd` , `labs-dev` and `labs-test` namespac
3737

3838
```bash
3939
$ helm template -f bootstrap-project/my-values.yaml bootstrap-project | oc apply -f-
40-
```
40+
```

charts/bootstrap-project/templates/bindings.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ items:
3434
{{- end }}
3535
{{- end }}
3636
{{- end }}
37-
{{- end }}
37+
{{- end }}

0 commit comments

Comments
 (0)