From 30185741bab0ebb8c73a185d1b2378a8f613fab7 Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Tue, 8 Mar 2022 12:03:17 +0100 Subject: [PATCH] Fix CI pipeline (#110) * Remove kubeval from Danger * Remove kubeval from CircleCI --- .circleci/config.yml | 13 ------------- README.md | 1 - dangerfile.ts | 18 ------------------ 3 files changed, 32 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7b3b7e8b..c9b45598 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -102,30 +102,17 @@ jobs: # yamllint pip install --user yamllint - - # Kubeval - wget --no-verbose -O - https://github.com/instrumenta/kubeval/releases/latest/download/kubeval-linux-amd64.tar.gz | sudo tar -xz -C /usr/local/bin/ - sudo chmod +x /usr/local/bin/kubeval - checkout - run: mkdir lint - run: name: yamllint command: | yamllint -c .yamllint.yml --strict -f parsable . > lint/yamllint.txt || true - - run: - name: Kubeval - command: | - kubeval --strict --schema-location https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/ \ - --kubernetes-version=${GKE_KUBERNETES_VERSION} --skip-kinds BackendConfig --directories k8s/ --output json --quiet > lint/kubeval.json || true - - store_artifacts: - path: lint/kubeval.json - destination: kubeval.json - store_artifacts: path: lint/yamllint.txt destination: yamllint.txt - save_cache: paths: - - lint/kubeval.json - lint/yamllint.txt key: lint-v{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}-{{ .Environment.CIRCLE_WORKFLOW_ID }} diff --git a/README.md b/README.md index 36aed924..0d687c8d 100644 --- a/README.md +++ b/README.md @@ -117,7 +117,6 @@ Docker images are being pushed to `eu.gcr.io/removebg-226919/removebg-core` and - `CACHE_VERSION`: `2` (increment to update cache) - `DOCKER_IMAGE_NAME`: `eu.gcr.io/removebg-226919/removebg` (base image name, `-core` and `-api` are appended automatically) - `GKE_CLUSTER`: `removebg-app` (which GKE cluster the app will be deployed to) -- `GKE_KUBERNETES_VERSION`: `1.20.8` (used by `kubeval` to validate K8s config) ## 🚚 Release Process diff --git a/dangerfile.ts b/dangerfile.ts index 9c158954..279abd2a 100644 --- a/dangerfile.ts +++ b/dangerfile.ts @@ -218,21 +218,3 @@ if (yamllintResult.includes("[error]") || yamllintResult.includes("[warning]")) if (yamllintResult.includes("warning") || yamllintResult.includes("error")) { fail("πŸ“Ž There are issues in your `.yaml` files!") } - -var kubevalJson = JSON.parse(fs.readFileSync("lint/kubeval.json").toString()); -var kubevalResult = ''; -const markdownHeaderKubeval = "| File | Status | Kind | Errors |\n| ----- |:------:| -------- | ------ |\n" - -kubevalJson.forEach(obj => { - var errors = ""; - obj.errors.forEach(error => { - errors += "
  • " + error + "
  • "; - }); - kubevalResult += "| `" + obj.filename + "` | **" + obj.status + "** | `" + obj.kind + "` | " + errors + " |\n"; -}); - -markdown("### Kubernetes Configuration\n\n" + markdownHeaderKubeval + kubevalResult); - -if (kubevalResult.includes("invalid")) { - fail("`☸️ Invalid Kubernetes configuration found!") -}