Skip to content

Commit

Permalink
chore: use global workflow for lint, yamlfmt, yamllint (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
leiicamundi authored Sep 20, 2024
1 parent 6810f2b commit 749c461
Show file tree
Hide file tree
Showing 6 changed files with 81 additions and 32 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
name: lint

on:
workflow_dispatch:
pull_request:
push:
branches: [main]

jobs:
lint:
uses: camunda/infraex-common-config/.github/workflows/lint-global.yml@029c5179173d1a31561827c078cdc2dee9faf8db # 1.1.0
secrets: inherit
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ terraform.rc

### VisualStudioCode ###
.vscode/*
!.vscode/settings.json
.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
Expand Down
61 changes: 36 additions & 25 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,39 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-added-large-files
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.95.0
hooks:
- id: terraform_fmt
- id: terraform_tflint
- repo: https://github.com/rhysd/actionlint
rev: v1.7.1
hooks:
- id: actionlint
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.9.0.6
hooks:
- id: shellcheck
args: ["--external-sources", "--source-path", ".github/workflows/scripts", "--exclude=SC2154,SC2034,SC1091"]
- repo: https://github.com/renovatebot/pre-commit-hooks
rev: 38.80.0
hooks:
- id: renovate-config-validator
args: ["--strict"]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-added-large-files
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.95.0
hooks:
- id: terraform_fmt
- id: terraform_tflint
- repo: https://github.com/rhysd/actionlint
rev: v1.7.1
hooks:
- id: actionlint-docker
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.9.0.6
hooks:
- id: shellcheck
args: [--external-sources, --source-path, .github/workflows/scripts, '--exclude=SC2154,SC2034,SC1091']
- repo: https://github.com/renovatebot/pre-commit-hooks
rev: 38.80.0
hooks:
- id: renovate-config-validator
args: [--strict]

- repo: https://github.com/adrienverge/yamllint
rev: v1.35.1
hooks:
- id: yamllint
args: [-c, .yamllint.yaml]

- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
rev: 0.2.3
hooks:
- id: yamlfmt
7 changes: 7 additions & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
pre-commit 3.8.0

python 3.12.6

terraform 1.9.5

tflint 0.53.0
17 changes: 17 additions & 0 deletions .yamllint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
extends: default

rules:
document-start:
level: error
comments:
level: error
min-spaces-from-content: 1
comments-indentation:
level: error
line-length:
max: 175
truthy:
# prevent false positives on Github Actions workflow files with `on`,
# see https://github.com/adrienverge/yamllint/issues/158
check-keys: false
13 changes: 7 additions & 6 deletions aws/ec2/configs/prometheus.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
---
global:
scrape_interval: 15s
scrape_interval: 15s
scrape_configs:
- job_name: 'prometheus'
scheme: http
metrics_path: '/actuator/prometheus'
static_configs:
- targets: ['localhost:9600']
- job_name: prometheus
scheme: http
metrics_path: /actuator/prometheus
static_configs:
- targets: [localhost:9600]

0 comments on commit 749c461

Please sign in to comment.