This repository has been archived by the owner on Feb 15, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore!: add containerization and packaging manifest lints (#937)
### BREAKING CHANGES GPU_CLASS_NAME is now GPU_RUNTIME to better align with both standard container baking conventions and the actual manifest field and purpose.
- Loading branch information
1 parent
522778c
commit c4d0835
Showing
101 changed files
with
1,426 additions
and
645 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,11 @@ | ||
**/*.tar.zst | ||
**/*.log* | ||
**/__pycache__ | ||
**/.ruff_cache | ||
**/Dockerfile* | ||
**/.gitignore | ||
**/Makefile | ||
**/Makefile | ||
**/node_modules | ||
**/.svelte-kit | ||
**/zarf-sbom/ | ||
**/zarf-*.tar.zst |
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,40 @@ | ||
name: Docker Lint | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- "main" | ||
paths: | ||
- "**/Dockerfile" | ||
- "**/Dockerfile.migrations" | ||
- "**/.dockerignore" | ||
- ".github/workflows/docker-lint.yaml" | ||
|
||
concurrency: | ||
group: docker-lint-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
docker-lint: | ||
runs-on: ubuntu-latest | ||
name: Lint Docker Manifest | ||
|
||
permissions: | ||
contents: write | ||
|
||
steps: | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Checkout Repo | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
|
||
- uses: hadolint/hadolint-action@54c9adbab1582c2ef04b2016b760714a4bfde3cf # v3.1.0 | ||
with: | ||
dockerfile: "*Dockerfile*" | ||
recursive: true | ||
config: .hadolint.yaml |
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,76 @@ | ||
name: Helm Lint | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- "main" | ||
paths: | ||
- "**/chart" | ||
- "**/values" | ||
- "**/*values.yaml" | ||
- ".github/workflows/helm-lint.yaml" | ||
|
||
concurrency: | ||
group: helm-lint-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
helm-lint: | ||
runs-on: ubuntu-latest | ||
name: Lint Helm Charts | ||
|
||
permissions: | ||
contents: read | ||
|
||
steps: | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Checkout Repo | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
|
||
- name: Setup Helm | ||
uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4.2.0 | ||
with: | ||
version: "v3.13.3" | ||
|
||
- name: Lint API Helm Charts | ||
if: always() | ||
run: | | ||
helm lint packages/api/chart --quiet | ||
- name: Lint llama-cpp-python Helm Charts | ||
if: always() | ||
run: | | ||
helm lint packages/llama-cpp-python/chart --quiet | ||
- name: Lint text-embeddings Helm Charts | ||
if: always() | ||
run: | | ||
helm lint packages/text-embeddings/chart --quiet | ||
- name: Lint vllm Helm Charts | ||
if: always() | ||
run: | | ||
helm lint packages/vllm/chart --quiet | ||
- name: Lint whisper Helm Charts | ||
if: always() | ||
run: | | ||
helm lint packages/whisper/chart --quiet | ||
- name: Lint repeater Helm Charts | ||
if: always() | ||
run: | | ||
helm lint packages/repeater/chart --quiet | ||
- name: Lint UI Helm Charts | ||
if: always() | ||
run: | | ||
helm lint packages/ui/chart --quiet | ||
# TODO: we will not be linting or refactoring Supabase charts until GitHub issue #968 is resolved and a path forward is provided |
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,48 @@ | ||
name: UDS Lint | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- "main" | ||
paths: | ||
- "bundles/**" | ||
- ".github/workflows/uds-lint.yaml" | ||
|
||
concurrency: | ||
group: uds-lint-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
uds-lint: | ||
runs-on: ubuntu-latest | ||
name: Lint UDS Manifest | ||
|
||
permissions: | ||
contents: read | ||
|
||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0 | ||
with: | ||
python-version-file: "pyproject.toml" | ||
|
||
- name: Install jsonschema | ||
run: pip install check-jsonschema==0.28.0 | ||
|
||
- name: Download UDS Bundle Schema | ||
run: curl -o uds.schema.json https://raw.githubusercontent.com/defenseunicorns/uds-cli/v0.14.0/uds.schema.json | ||
|
||
- name: Validate uds-bundle.yaml (dev) | ||
if: always() | ||
run: | | ||
check-jsonschema bundles/dev/gpu/uds-bundle.yaml --schemafile uds.schema.json | ||
check-jsonschema bundles/dev/cpu/uds-bundle.yaml --schemafile uds.schema.json | ||
- name: Validate uds-bundle.yaml (latest) | ||
if: always() | ||
run: | | ||
check-jsonschema bundles/latest/gpu/uds-bundle.yaml --schemafile uds.schema.json | ||
check-jsonschema bundles/latest/cpu/uds-bundle.yaml --schemafile uds.schema.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
name: Zarf Lint | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- "main" | ||
paths: | ||
- "**/zarf.yaml" | ||
- ".github/workflows/zarf-lint.yaml" | ||
|
||
concurrency: | ||
group: zarf-lint-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
zarf-lint: | ||
runs-on: ubuntu-latest | ||
name: Lint Zarf Manifest | ||
|
||
permissions: | ||
contents: read | ||
|
||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0 | ||
with: | ||
python-version-file: "pyproject.toml" | ||
|
||
- name: Download Zarf Package Schema | ||
# TODO: renovate setup | ||
run: curl -o zarf.schema.json https://raw.githubusercontent.com/defenseunicorns/uds-cli/v0.14.0/zarf.schema.json | ||
|
||
- name: Install jsonschema | ||
run: pip install check-jsonschema==0.28.0 | ||
|
||
- name: Validate API zarf.yaml | ||
if: always() | ||
run: | | ||
check-jsonschema packages/api/zarf.yaml --schemafile zarf.schema.json | ||
- name: Validate llama-cpp-python zarf.yaml | ||
if: always() | ||
run: | | ||
check-jsonschema packages/llama-cpp-python/zarf.yaml --schemafile zarf.schema.json | ||
- name: Validate repeater zarf.yaml | ||
if: always() | ||
run: | | ||
check-jsonschema packages/repeater/zarf.yaml --schemafile zarf.schema.json | ||
- name: Validate supabase zarf.yaml | ||
if: always() | ||
run: | | ||
check-jsonschema packages/supabase/zarf.yaml --schemafile zarf.schema.json | ||
- name: Validate text-embeddings zarf.yaml | ||
if: always() | ||
run: | | ||
check-jsonschema packages/text-embeddings/zarf.yaml --schemafile zarf.schema.json | ||
- name: Validate UI zarf.yaml | ||
if: always() | ||
run: | | ||
check-jsonschema packages/ui/zarf.yaml --schemafile zarf.schema.json | ||
- name: Validate vllm zarf.yaml | ||
if: always() | ||
run: | | ||
check-jsonschema packages/vllm/zarf.yaml --schemafile zarf.schema.json | ||
- name: Validate whisper zarf.yaml | ||
if: always() | ||
run: | | ||
check-jsonschema packages/whisper/zarf.yaml --schemafile zarf.schema.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
failure-threshold: error | ||
# TODO: slowly burn down these lower priority container warnings and errors, issue #984 | ||
ignored: | ||
- DL3007 # use of latest image | ||
- DL3042 # pip --no-cache-dir | ||
- DL4006 # shell usage warning | ||
- DL3009 # apt-get list | ||
- DL3015 # --no-install-recommends | ||
- DL3018 # pinning distro package versions | ||
- DL3008 # pinning distro package versions | ||
- DL3045 # usage of relative COPY | ||
- DL3002 # last user as root | ||
- SC2086 # double quote vs single quote usage |
Oops, something went wrong.