ci: restore docker-based lint and validate jobs
This commit is contained in:
4 files changed
+68
-72
No files matched your search
+21
-24
@@ -28,12 +28,11 @@ jobs:
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
command -v prettier >/dev/null 2>&1 || {
|
docker run --rm \
|
||||||
echo "prettier is required on PATH but was not found."
|
-v "$PWD:/work" \
|
||||||
exit 1
|
-w /work \
|
||||||
}
|
node:22-alpine \
|
||||||
|
sh -lc 'npx --yes prettier@3 --check --ignore-unknown "$@"' sh "${prettier_files[@]}"
|
||||||
prettier --check --ignore-unknown "${prettier_files[@]}"
|
|
||||||
|
|
||||||
ruff:
|
ruff:
|
||||||
runs-on: [self-hosted, linux, arch, homelab]
|
runs-on: [self-hosted, linux, arch, homelab]
|
||||||
@@ -44,12 +43,11 @@ jobs:
|
|||||||
- name: Lint Python with Ruff
|
- name: Lint Python with Ruff
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
command -v ruff >/dev/null 2>&1 || {
|
docker run --rm \
|
||||||
echo "ruff is required on PATH but was not found."
|
-v "$PWD:/work" \
|
||||||
exit 1
|
-w /work \
|
||||||
}
|
ghcr.io/astral-sh/ruff:latest \
|
||||||
|
check .
|
||||||
ruff check .
|
|
||||||
|
|
||||||
yamllint:
|
yamllint:
|
||||||
runs-on: [self-hosted, linux, arch, homelab]
|
runs-on: [self-hosted, linux, arch, homelab]
|
||||||
@@ -60,12 +58,11 @@ jobs:
|
|||||||
- name: Lint YAML syntax
|
- name: Lint YAML syntax
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
command -v yamllint >/dev/null 2>&1 || {
|
docker run --rm \
|
||||||
echo "yamllint is required on PATH but was not found."
|
-v "$PWD:/work" \
|
||||||
exit 1
|
-w /work \
|
||||||
}
|
cytopia/yamllint:latest \
|
||||||
|
-c .yamllint .
|
||||||
yamllint -c .yamllint .
|
|
||||||
|
|
||||||
hadolint:
|
hadolint:
|
||||||
runs-on: [self-hosted, linux, arch, homelab]
|
runs-on: [self-hosted, linux, arch, homelab]
|
||||||
@@ -85,9 +82,9 @@ jobs:
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
command -v hadolint >/dev/null 2>&1 || {
|
docker run --rm \
|
||||||
echo "hadolint is required on PATH but was not found."
|
-v "$PWD:/work" \
|
||||||
exit 1
|
-w /work \
|
||||||
}
|
--entrypoint hadolint \
|
||||||
|
hadolint/hadolint:latest-debian \
|
||||||
hadolint -c .hadolint.yaml "${dockerfiles[@]}"
|
-c .hadolint.yaml "${dockerfiles[@]}"
|
||||||
@@ -17,12 +17,11 @@ jobs:
|
|||||||
- name: Lint YAML syntax
|
- name: Lint YAML syntax
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
command -v yamllint >/dev/null 2>&1 || {
|
docker run --rm \
|
||||||
echo "yamllint is required on PATH but was not found."
|
-v "$PWD:/work" \
|
||||||
exit 1
|
-w /work \
|
||||||
}
|
cytopia/yamllint:latest \
|
||||||
|
-c .yamllint .
|
||||||
yamllint -c .yamllint .
|
|
||||||
|
|
||||||
k8s:
|
k8s:
|
||||||
runs-on: [self-hosted, linux, arch, homelab]
|
runs-on: [self-hosted, linux, arch, homelab]
|
||||||
@@ -43,9 +42,11 @@ jobs:
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
command -v kubeconform >/dev/null 2>&1 || {
|
docker run --rm \
|
||||||
echo "kubeconform is required on PATH but was not found."
|
-v "$PWD:/work" \
|
||||||
exit 1
|
-w /work \
|
||||||
}
|
ghcr.io/yannh/kubeconform:latest \
|
||||||
|
-strict \
|
||||||
kubeconform -strict -ignore-missing-schemas -summary "${manifests[@]}"
|
-ignore-missing-schemas \
|
||||||
|
-summary \
|
||||||
|
"${manifests[@]}"
|
||||||
+21
-24
@@ -28,12 +28,11 @@ jobs:
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
command -v prettier >/dev/null 2>&1 || {
|
docker run --rm \
|
||||||
echo "prettier is required on PATH but was not found."
|
-v "$PWD:/work" \
|
||||||
exit 1
|
-w /work \
|
||||||
}
|
node:22-alpine \
|
||||||
|
sh -lc 'npx --yes prettier@3 --check --ignore-unknown "$@"' sh "${prettier_files[@]}"
|
||||||
prettier --check --ignore-unknown "${prettier_files[@]}"
|
|
||||||
|
|
||||||
ruff:
|
ruff:
|
||||||
runs-on: [self-hosted, linux, arch, homelab]
|
runs-on: [self-hosted, linux, arch, homelab]
|
||||||
@@ -44,12 +43,11 @@ jobs:
|
|||||||
- name: Lint Python with Ruff
|
- name: Lint Python with Ruff
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
command -v ruff >/dev/null 2>&1 || {
|
docker run --rm \
|
||||||
echo "ruff is required on PATH but was not found."
|
-v "$PWD:/work" \
|
||||||
exit 1
|
-w /work \
|
||||||
}
|
ghcr.io/astral-sh/ruff:latest \
|
||||||
|
check .
|
||||||
ruff check .
|
|
||||||
|
|
||||||
yamllint:
|
yamllint:
|
||||||
runs-on: [self-hosted, linux, arch, homelab]
|
runs-on: [self-hosted, linux, arch, homelab]
|
||||||
@@ -60,12 +58,11 @@ jobs:
|
|||||||
- name: Lint YAML syntax
|
- name: Lint YAML syntax
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
command -v yamllint >/dev/null 2>&1 || {
|
docker run --rm \
|
||||||
echo "yamllint is required on PATH but was not found."
|
-v "$PWD:/work" \
|
||||||
exit 1
|
-w /work \
|
||||||
}
|
cytopia/yamllint:latest \
|
||||||
|
-c .yamllint .
|
||||||
yamllint -c .yamllint .
|
|
||||||
|
|
||||||
hadolint:
|
hadolint:
|
||||||
runs-on: [self-hosted, linux, arch, homelab]
|
runs-on: [self-hosted, linux, arch, homelab]
|
||||||
@@ -85,9 +82,9 @@ jobs:
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
command -v hadolint >/dev/null 2>&1 || {
|
docker run --rm \
|
||||||
echo "hadolint is required on PATH but was not found."
|
-v "$PWD:/work" \
|
||||||
exit 1
|
-w /work \
|
||||||
}
|
--entrypoint hadolint \
|
||||||
|
hadolint/hadolint:latest-debian \
|
||||||
hadolint -c .hadolint.yaml "${dockerfiles[@]}"
|
-c .hadolint.yaml "${dockerfiles[@]}"
|
||||||
@@ -17,12 +17,11 @@ jobs:
|
|||||||
- name: Lint YAML syntax
|
- name: Lint YAML syntax
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
command -v yamllint >/dev/null 2>&1 || {
|
docker run --rm \
|
||||||
echo "yamllint is required on PATH but was not found."
|
-v "$PWD:/work" \
|
||||||
exit 1
|
-w /work \
|
||||||
}
|
cytopia/yamllint:latest \
|
||||||
|
-c .yamllint .
|
||||||
yamllint -c .yamllint .
|
|
||||||
|
|
||||||
k8s:
|
k8s:
|
||||||
runs-on: [self-hosted, linux, arch, homelab]
|
runs-on: [self-hosted, linux, arch, homelab]
|
||||||
@@ -43,9 +42,11 @@ jobs:
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
command -v kubeconform >/dev/null 2>&1 || {
|
docker run --rm \
|
||||||
echo "kubeconform is required on PATH but was not found."
|
-v "$PWD:/work" \
|
||||||
exit 1
|
-w /work \
|
||||||
}
|
ghcr.io/yannh/kubeconform:latest \
|
||||||
|
-strict \
|
||||||
kubeconform -strict -ignore-missing-schemas -summary "${manifests[@]}"
|
-ignore-missing-schemas \
|
||||||
|
-summary \
|
||||||
|
"${manifests[@]}"
|
||||||
Reference in new issue
Block a user