Skip to content

Commit

Permalink
Fix CI pipeline (kubeflow#110)
Browse files Browse the repository at this point in the history
* Remove kubeval from Danger
* Remove kubeval from CircleCI
  • Loading branch information
otherguy authored Mar 8, 2022
1 parent bfb87c1 commit 3018574
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 32 deletions.
13 changes: 0 additions & 13 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
18 changes: 0 additions & 18 deletions dangerfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 += "<li>" + error + "</li>";
});
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!")
}

0 comments on commit 3018574

Please sign in to comment.