Skip to content

Commit

Permalink
feat added lint.yaml and updated renovate and pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael-Kruggel committed May 8, 2024
1 parent 10af77b commit 0bf21b1
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 121 deletions.
15 changes: 7 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.6.0
hooks:
- id: check-added-large-files
args: ["--maxkb=1024"]
Expand All @@ -11,7 +11,7 @@ repos:
- id: detect-private-key
exclude: |
(?x)^(
kustomizations/bigbang/environment-bb/values-bigbang.enc.yaml
chart/templates/uds-package.yaml
)$
- id: end-of-file-fixer
exclude: "^kustomizations/bigbang/vendor/.*$"
Expand All @@ -22,7 +22,7 @@ repos:
- id: check-yaml
exclude: |
(?x)^(
chart/templates/uds-package.yaml
charts/raw/templates/resources.yaml
)$
args:
- "--allow-multiple-documents"
Expand All @@ -31,7 +31,7 @@ repos:
hooks:
- id: fix-smartquotes
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.24.1
rev: 0.28.2
hooks:
- id: check-jsonschema
name: "Validate Zarf Configs Against Schema"
Expand All @@ -40,15 +40,14 @@ repos:
args:
[
"--schemafile",
# renovate: repo-file depName=defenseunicorns/zarf versioning=semver
"https://raw.githubusercontent.com/defenseunicorns/zarf/v0.32.2/zarf.schema.json",
"https://raw.githubusercontent.com/defenseunicorns/zarf/v0.33.1/zarf.schema.json",
"--no-cache"
]
- repo: https://github.com/golangci/golangci-lint
rev: v1.54.1
rev: v1.57.2
hooks:
- id: golangci-lint
- repo: https://github.com/renovatebot/pre-commit-hooks
rev: 36.43.1
rev: 37.338.0
hooks:
- id: renovate-config-validator
35 changes: 35 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
yaml-files:
- '**/*.y*ml'
- '.yamllint'

ignore:
- '**/chart/templates**'

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
126 changes: 13 additions & 113 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -1,129 +1,29 @@
{
"enabled": true,
"forkProcessing": "enabled",
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
":dependencyDashboard",
"github>defenseunicorns/uds-common//config/renovate.json5",
":semanticCommits",
":semanticPrefixFixDepsChoreOthers",
"config:base",
"group:all",
"replacements:all",
"workarounds:all"
],
"timezone": "America/New_York",
"rebaseStalePrs": true,
"schedule": ["after 7am and before 9am every weekday"],
"dependencyDashboard": true,
"platform": "github",
"onboarding": false,
"requireConfig": false,
"dependencyDashboardTitle": "Renovate Dashboard 🤖",
"rebaseWhen": "conflicted",
"commitBodyTable": true,
"ignorePaths": ["archive/**"],
"suppressNotifications": ["prIgnoreNotification"],
"pre-commit": {
"enabled": true
},
"helm-values": {
"fileMatch": ["./.+\\.yaml$"]
},
"kubernetes": {
"fileMatch": ["\\.yaml$"],
"ignorePaths": [
"ansible",
"scripts",
".github"
]
},
"hostRules": [
{
"matchHost": "registry1.dso.mil",
"hostType": "docker",
"description": "Encrypted creds for registry1, scoped to this Github org using: https://github.com/renovatebot/renovate/blob/main/docs/usage/configuration-options.md#encrypted",
"encrypted": {
"username": "wcFMA/xDdHCJBTolAQ//a+5GNAOsD/UOKnqJDdbPRr73EXRgyRdtMOIqDyjGZIKcdVo64StgUb1O37O5bazoyGeYkcISaWjInxRuoBOxqFhdo5cTUIJavjm2Sn75OWCDBUr2Q5/OSluQDbp7QO9g4+cHxcjtldlMswZg0RIoSX8rtAcNvJePvuWDKRHmUSDbWrNoAPaqOUvBIUF+BUR8o2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EuRBlW8kM0rGWGyv7U62sx+2zjK0v2uNHJz0hzWaEfriOQu4B7/avb+CIupfVYGNllyMTuB2ySDMLKN3Q/EB7q97apWqwcnThxRhK7t3e59ea4JDxodxeeTG3m/UgBLBlXCutk7BsC7NQPaSeOzV7mw6AOVQz+Bn0DAGd1x03ITYAcgfYvSW7VCfhrvnmuSVICHA7GTYevC7RBYhexWdgHZb98mIt1vVA2C+h7eqsx+xWhHQFE2+lNRTRmj9ccU/6qz1+3zqHdMQ/WD8MLofSdgFLU/A7qljUm/dk1MEVMtGznukdRpJJV4PsEcwh2OV/9is5KPyFQ83M7sl3/fY+CBaHFEiT4j/bSBznmxL3TuAjMdIT7j0cNsOxnsHllgRHL1qG3S2ZmAQ0Ex4gIUUGn2VbZLyRogJspsjxx5ZYuuYVfhtSaTU"
}
}
],
"regexManagers": [
{
"fileMatch": [".*\\.ya?ml$"],
"matchStrings": [
"# renovate: datasource=helm\\n .*- name: (?<depName>.*?)\\n *url: (?<registryUrl>.*?)\\n *version: (?<currentValue>.*)\\n"
],
"datasourceTemplate": "helm",
"extractVersionTemplate": "{{#if extractVersion}}{{{extractVersion}}}{{else}}^(?<version>.*)${{/if}}"
},
{
"fileMatch": [".*\\.ya?ml$"],
"matchStrings": [
"# renovate: datasource=(?<datasource>.*?) depName=(?<depName>.*?)( versioning=(?<versioning>.*?))?( extractVersion=(?<extractVersion>.*?))?( registryUrl=(?<registryUrl>.*?))?\\s.*?:\\s*['\"]?(?<currentValue>.*?)['\"]?\\s"
],
"versioningTemplate": "{{#if versioning}}{{{versioning}}}{{else}}semver-coerced{{/if}}",
"extractVersionTemplate": "{{#if extractVersion}}{{{extractVersion}}}{{else}}^(?<version>.*)${{/if}}"
},
{
"fileMatch": [".*\\.ya?ml$"],
"matchStrings": [
"# renovate: zarf-uri datasource=github-tags depName=(?<depName>.*?)( versioning=(?<versioning>.*?))?\\s.*?uri: ['\"]https:\\/\\/github.com\\/defenseunicorns\\/zarf\\/releases\\/download\\/(?<currentValue>.*)\\/zarf_.*_Linux_amd64['\"]",
"# renovate: zarf-uri datasource=github-tags depName=(?<depName>.*?)( versioning=(?<versioning>.*?))?\\s.*?uri: ['\"]https:\\/\\/github.com\\/defenseunicorns\\/zarf\\/releases\\/download\\/.*\\/zarf_(?<currentValue>.*)_Linux_amd64['\"]"
],
"versioningTemplate": "{{#if versioning}}{{{versioning}}}{{else}}semver-coerced{{/if}}",
"datasourceTemplate": "github-tags"
},
{
"fileMatch": [".*\\.ya?ml$"],
"matchStrings": [
"# renovate: repo-file depName=(?<depName>.*?)( versioning=(?<versioning>.*?))?\\n.*\\/(?<currentValue>v.*?)\\/"
],
"versioningTemplate": "{{#if versioning}}{{{versioning}}}{{else}}semver-coerced{{/if}}",
"datasourceTemplate": "github-tags"
},
{
"fileMatch": [".*\\/?zarf\\.ya?ml$"],
"matchStrings": [
"-\\s+['\"]{0,1}(?<depName>[^:\\s]+):(?<currentValue>\\S+)['\"]{0,1}\\n"
],
"versioningTemplate": "{{#if versioning}}{{{versioning}}}{{else}}semver-coerced{{/if}}",
"datasourceTemplate": "docker",
"extractVersionTemplate": "{{#if extractVersion}}{{{extractVersion}}}{{else}}^(?<version>.*)${{/if}}"
},
{
"fileMatch": ["^Makefile$"],
"matchStrings": [
"renovate: datasource=(?<datasource>.*?) depName=(?<depName>.*?)( versioning=(?<versioning>.*?))?( extractVersion=(?<extractVersion>.*?))?( registryUrl=(?<registryUrl>.*?))?\\s.*?=\\s*['\"]?(?<currentValue>.*?)['\"]?\\s"
],
"versioningTemplate": "{{#if versioning}}{{{versioning}}}{{else}}semver-coerced{{/if}}",
"extractVersionTemplate": "{{#if extractVersion}}{{{extractVersion}}}{{else}}^(?<version>.*)${{/if}}"
},
"packageRules": [
{
"fileMatch": [".*\\/?zarf\\.ya?ml$"],
"matchStrings": [
"# renovate: bb-chart\\n .*- name: .*?\\n *url: ['\"]{0,1}(?<registryUrl>https:\\/\\/.*?)\\/(?<depName>.*?)\\.git['\"]{0,1}\\n *version: ['\"]{0,1}(?<currentValue>.*?)['\"]{0,1}\\n"
],
"datasourceTemplate": "gitlab-tags"
"groupName": "Artifactory Support Dependencies",
"labels": ["support-deps"],
"commitMessageTopic": "support-deps",
"packagePatterns": ["*"]
},
{
"fileMatch": ["^\\.github/workflows/commitlint\\.yaml$"],
"matchStrings": [
"npm install --save-dev (?<depName>@?.*?)@(?<currentValue>.+)"
],
"datasourceTemplate": "npm"
}
],
"packageRules": [
{
"matchManagers": ["terraform"],
"matchDepTypes": ["module"],
"matchDatasources": ["github-tags", "git-tags"],
"versioning": "loose"
"groupName": "Artifactory Package Dependencies",
"labels": ["package-deps"],
"commitMessageTopic": "package-deps",
"matchDatasources": ["docker", "helm", "git-tags"]
},
{
"matchPackagePatterns": ["big-bang/.*"],
"matchDatasources": ["gitlab-tags"],
"allowedVersions": "!/^v.*$/"
"matchPackageNames": ["https://repo1.dso.mil/big-bang/product/packages/artifactory.git"],
"allowedVersions": "/.+-bb.+/"
}
]
}

0 comments on commit 0bf21b1

Please sign in to comment.