-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add lint testing workflow and precommit (#214)
* ci: add lint testing workflow * ci: add setup task * ci: add actions task * ci: fix lint issues to get workflow to pass * ci: fix shell lint errors * feat: adding pre-commit and fixes * test pre-commit * add uds precommit task and fix syntax * feat: add tasks for deps * fix: update tasks and gitignore * fix: update yamllint to ignore scratch and add dep msging * ci: update renovate to track precommit vers * ci: update to latest common version * ci: update uds-common callable gh workflow version * ci: update workflow to use precommit also * Most updates (#223) * chore(deps): update all dependencies | datasource | package | from | to | | ----------- | ------------------------------------------------------------------ | ---------------------- | ---------------------- | | helm | cert-manager | v1.14.5 | v1.16.1 | | github-tags | defenseunicorns/uds-cli | 0.16.0 | 0.17.0 | | github-tags | defenseunicorns/uds-cli | v0.13.1 | v0.17.0 | | github-tags | defenseunicorns/uds-cli | v0.16.0 | v0.17.0 | | docker | ghcr.io/defenseunicorns/packages/metallb | 0.0.5-amd64 | 0.1.1-amd64 | | docker | ghcr.io/defenseunicorns/packages/uds/core | 0.28.0-registry1 | 0.29.0-registry1 | | docker | ghcr.io/defenseunicorns/packages/uds/gitlab | 17.2.7-uds.2-registry1 | 17.2.9-uds.0-registry1 | | docker | ghcr.io/defenseunicorns/packages/uds/gitlab-runner | 17.1.0-uds.1-registry1 | 17.2.1-uds.2-registry1 | | docker | ghcr.io/defenseunicorns/packages/uds/mattermost | 10.0.0-uds.0-registry1 | 10.0.0-uds.1-registry1 | | docker | ghcr.io/defenseunicorns/packages/uds/sonarqube | 10.6.0-uds.1-registry1 | 10.7.0-uds.0-registry1 | | docker | ghcr.io/zarf-dev/packages/init | v0.39.0 | v0.41.0 | | docker | quay.io/jetstack/cert-manager-acmesolver | v1.14.5 | v1.16.1 | | docker | quay.io/jetstack/cert-manager-cainjector | v1.14.5 | v1.16.1 | | docker | quay.io/jetstack/cert-manager-controller | v1.14.5 | v1.16.1 | | docker | quay.io/jetstack/cert-manager-startupapicheck | v1.14.5 | v1.16.1 | | docker | quay.io/jetstack/cert-manager-webhook | v1.14.5 | v1.16.1 | | docker | quay.io/jetstack/trust-manager | v0.11.0 | v0.12.0 | | docker | registry.k8s.io/sig-storage/csi-attacher | v4.4.3 | v4.7.0 | | docker | registry.k8s.io/sig-storage/csi-external-health-monitor-controller | v0.10.0 | v0.13.0 | | docker | registry.k8s.io/sig-storage/csi-node-driver-registrar | v2.11.1 | v2.12.0 | | docker | registry.k8s.io/sig-storage/csi-provisioner | v5.0.1 | v5.1.0 | | docker | registry.k8s.io/sig-storage/csi-resizer | v1.11.2 | v1.12.0 | | docker | registry.k8s.io/sig-storage/csi-snapshotter | v6.3.2 | v8.1.0 | | docker | registry.k8s.io/sig-storage/livenessprobe | v2.13.1 | v2.14.0 | | docker | registry.k8s.io/sig-storage/snapshot-controller | v6.3.2 | v8.1.0 | | docker | registry.k8s.io/sig-storage/snapshot-validation-webhook | v6.3.2 | v8.1.0 | | docker | registry1.dso.mil/ironbank/opensource/velero/velero-plugin-for-aws | v1.10.0 | v1.10.1 | | helm | trust-manager | v0.11.0 | v0.12.0 | * deps: reverted update to metallb as it's causd problems before * docs: updated manual SBOM with updated versions * deps: reverted GitLab back to v17.1.0 b/c mkdir error on deploy * deps: revert uds CLI to version in latest build harness * deps: update build harness to latest patch release * deps: revert uds CLI to 0.16.0 in vscode settings too * Apply suggestions from code review Co-authored-by: awendt <[email protected]> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: awendt <[email protected]> --------- Co-authored-by: Joseph Richardson <[email protected]> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: awendt <[email protected]>
- Loading branch information
1 parent
67943ba
commit 84d5f73
Showing
17 changed files
with
191 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Lint | ||
|
||
on: | ||
# This workflow is triggered on pull requests to the main branch. | ||
pull_request: | ||
branches: [main] | ||
# milestoned is added here as a workaround for release-please not triggering PR workflows (PRs should be added to a milestone to trigger the workflow). | ||
types: [milestoned, opened, edited, synchronize] | ||
|
||
jobs: | ||
run: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read # Allows reading the repo contents | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install UDS CLI | ||
uses: defenseunicorns/setup-uds@b987a32bac3baeb67bfb08f5e1544e2f9076ee8a # v1.0.0 | ||
with: | ||
version: v0.17.0 | ||
|
||
- name: Install lint deps | ||
run: | | ||
uds run deps --no-progress | ||
- name: Lint the repository (using Precommit) | ||
run: | | ||
uds run precommit --no-progress |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
repos: | ||
################ | ||
# GENERAL CHECKS | ||
################ | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.0.1 | ||
hooks: | ||
- id: check-added-large-files | ||
name: Large Files Check | ||
args: ["--maxkb=1024"] | ||
|
||
- id: detect-private-key | ||
name: Check Private Keys | ||
|
||
- id: check-merge-conflict | ||
name: Merge Conflict Resolution Check | ||
|
||
- id: end-of-file-fixer | ||
name: Newline EOF Checker | ||
|
||
- id: fix-byte-order-marker | ||
name: Fix UTF-8 byte order marker | ||
|
||
- id: trailing-whitespace | ||
name: Whitespace Cleaning Check | ||
args: [--markdown-linebreak-ext=md] | ||
|
||
- repo: https://github.com/gitleaks/gitleaks | ||
rev: v8.18.0 | ||
hooks: | ||
- id: gitleaks | ||
name: GitLeaks Checks | ||
|
||
- repo: https://github.com/sirosen/texthooks | ||
rev: 0.6.7 | ||
hooks: | ||
- id: fix-smartquotes | ||
- id: fix-spaces | ||
- id: fix-ligatures | ||
|
||
############ | ||
# CODE LINT | ||
############ | ||
|
||
- repo: local | ||
hooks: | ||
- id: yaml-lint | ||
name: "Yaml Lint" | ||
entry: | | ||
bash -c 'uds run lint:yaml' | ||
language: system | ||
|
||
- repo: local | ||
hooks: | ||
- id: shell-check | ||
name: "Shell Check" | ||
entry: | | ||
bash -c 'uds run lint:shell' | ||
language: system |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
yaml-files: | ||
- '**/*.y*ml' | ||
- '.yamllint' | ||
|
||
ignore: | ||
- '**/chart/templates**' | ||
- 'scratch/**' | ||
|
||
rules: | ||
anchors: enable | ||
braces: enable | ||
brackets: enable | ||
colons: enable | ||
commas: enable | ||
comments: | ||
level: warning | ||
comments-indentation: | ||
level: warning | ||
document-end: disable | ||
document-start: | ||
level: warning | ||
empty-lines: enable | ||
empty-values: disable | ||
float-values: disable | ||
hyphens: enable | ||
indentation: enable | ||
key-duplicates: enable | ||
key-ordering: disable | ||
line-length: disable | ||
new-line-at-end-of-file: enable | ||
new-lines: enable | ||
octal-values: disable | ||
quoted-strings: disable | ||
trailing-spaces: enable | ||
truthy: | ||
level: warning |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -165,4 +165,4 @@ destroy-ns <namespace> | |
|
||
# So we don't dirty the git history | ||
rm temp.json | ||
``` | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -194,4 +194,3 @@ variables: | |
# SSO requires a license | ||
NEXUS_SSO_ENABLED: false | ||
NEXUS_LICENSE_KEY: "" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
Due to an upstream bug ([tracked here](https://github.com/defenseunicorns/pepr/issues/745)) in pepr, each exemption needs to be installed sequentially 1 at a time and the easiest way to do that is separate zarf files. | ||
|
||
TODO - track progress against that issue, and return the nutanix-csi-exemption to the parent additional-manifests zarf package when the issue is resolved. | ||
TODO - track progress against that issue, and return the nutanix-csi-exemption to the parent additional-manifests zarf package when the issue is resolved. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,5 +9,8 @@ | |
"group:all", | ||
"replacements:all", | ||
"workarounds:all" | ||
] | ||
], | ||
"pre-commit": { | ||
"enabled": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters