fix(ci): Add Kyverno CI Lint

This commit is contained in:
Dominik Kaminski
2024-01-17 18:17:44 +01:00
parent 67f7c05038
commit e778a59cdd
31 changed files with 967 additions and 51 deletions

View File

@@ -0,0 +1,17 @@
# SPDX-FileCopyrightText: 2023 Bundesministerium des Innern und für Heimat, PG ZenDiS "Projektgruppe für Aufbau ZenDiS"
# SPDX-License-Identifier: Apache-2.0
---
variables:
OPENDESK_CI_CLI_IMAGE: "registry.opencode.de/bmi/opendesk/tooling/opendesk-ci-cli:2.2.0\
@sha256:b36b1fc8a19605306dffef2c919c2a6bf5a3099e8a42ecb39a416394410b75d7"
OPENDESK_LINT_IMAGE: "registry.opencode.de/bmi/opendesk/components/platform-development/images/ci-lint:1.0.1\
@sha256:5b1bd85cc73ba0cede1f37d79fa7eeebffa653afa7944406eea9287c29a7769a"
.lint-common:
cache: {}
needs: []
stage: "lint"
tags:
- "docker"
...

View File

@@ -0,0 +1,35 @@
# SPDX-FileCopyrightText: 2023 Bundesministerium des Innern und für Heimat, PG ZenDiS "Projektgruppe für Aufbau ZenDiS"
# SPDX-License-Identifier: Apache-2.0
---
include:
- local: "/.gitlab/lint/lint-common.yml"
lint-kyverno:
allow_failure: true
extends: ".lint-common"
image: "${OPENDESK_LINT_IMAGE}"
parallel:
matrix:
- APP:
- "collabora"
- "cryptpad"
- "element"
- "intercom-service"
- "jitsi"
- "nextcloud"
- "open-xchange"
- "openproject"
- "openproject-bootstrap"
- "provisioning"
- "services"
- "univention-management-stack"
- "xwiki"
script:
- "cd ${CI_PROJECT_DIR}/helmfile/apps/${APP}"
- "helmfile template -e test --include-needs > ${CI_PROJECT_DIR}/.kyverno/opendesk.yaml"
- "node /app/opendesk-ci-cli/src/index.js generate-kyverno-tests -d ${CI_PROJECT_DIR}/.kyverno -t required ${APP}"
- "node /app/opendesk-ci-cli/src/index.js filter-for-kinds -f ${CI_PROJECT_DIR}/.kyverno/opendesk.yaml"
- "cd ${CI_PROJECT_DIR}/.kyverno"
- "kyverno test ."
...

View File

@@ -0,0 +1,13 @@
# SPDX-FileCopyrightText: 2023 Bundesministerium des Innern und für Heimat, PG ZenDiS "Projektgruppe für Aufbau ZenDiS"
# SPDX-License-Identifier: Apache-2.0
---
include:
- local: "/.gitlab/lint/lint-common.yml"
lint-opendesk:
extends: ".lint-common"
image: "${OPENDESK_CI_CLI_IMAGE}"
script:
- "node /app/src/index.js sort-all -d ${CI_PROJECT_DIR}/helmfile"
- "git diff --exit-code"
...