Skip to content

Commit

Permalink
Merge pull request fluxcd#23 from fluxcd/ci-validate-manifests
Browse files Browse the repository at this point in the history
Add CircleCI validation job for Kubernetes resources
  • Loading branch information
stefanprodan authored Oct 21, 2019
2 parents f487106 + 93f18ea commit 1cbdb18
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 4 deletions.
39 changes: 39 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
version: 2.1
jobs:
validate-yamls:
docker:
- image: circleci/golang:1.13
steps:
- checkout
- run:
name: Install kubeval and hrval
command: |
curl -sL https://raw.githubusercontent.com/stefanprodan/hrval-action/v2.3.0/src/deps.sh | sudo bash
sudo curl -sL https://raw.githubusercontent.com/stefanprodan/hrval-action/v2.3.0/src/hrval.sh \
-o /usr/local/bin/hrval.sh && sudo chmod +x /usr/local/bin/hrval.sh
sudo curl -sL https://raw.githubusercontent.com/stefanprodan/hrval-action/v2.3.0/src/hrval-all.sh \
-o /usr/local/bin/hrval && sudo chmod +x /usr/local/bin/hrval
- run:
name: Validate workloads
environment:
KUBE_VER: "1.16.0"
command: |
kubeval --strict --ignore-missing-schemas --kubernetes-version ${KUBE_VER} -d namespaces,workloads,releases
- run:
name: Validate releases
environment:
IGNORE_VALUES: "false"
KUBE_VER: "1.15.0"
HELM_VER: "v2"
command: |
hrval releases/ $IGNORE_VALUES $KUBE_VER $HELM_VER
workflows:
version: 2
validate:
jobs:
- validate-yamls:
filters:
branches:
ignore:
- gh-pages
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
# flux-get-started

[![CircleCI](https://circleci.com/gh/fluxcd/flux-get-started.svg?style=svg)](https://circleci.com/gh/fluxcd/flux-get-started)

We published a step-by-step run-through on how to use Flux and Helm Operator [over
here](https://github.com/fluxcd/flux/blob/master/docs/tutorials/get-started-helm.md).

### Workloads
## Workloads

[podinfo](https://github.com/stefanprodan/podinfo)
* Kubernetes deployment, ClusterIP service and Horizontal Pod Autoscaler
* init container automated image updates (regular expression filter)
* container automated image updates (semantic versioning filter)

### Helm releases
## Helm Releases

Mongodb
* Source: Helm repository (stable)
Expand All @@ -27,7 +29,13 @@ Ghost
* disabled automated image updates (glob filter)
* has external dependency - mariadb (stable)

## <a name="help"></a>Getting Help
## Manifests Validation

CircleCI [jobs](./.circleci/config.yml):
* validate Kubernetes manifests with [kubeval](https://github.com/instrumenta/kubeval)
* validate Flux Helm Releases with [hrval](https://github.com/stefanprodan/hrval-action)

### <a name="help"></a>Getting Help

If you have any questions about, feedback for or problems with `flux-get-started`:

Expand Down
2 changes: 1 addition & 1 deletion releases/ghost.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ metadata:
spec:
releaseName: ghost
chart:
git: ssh://git@github.com/weaveworks/flux-get-started
git: ssh://git@github.com/fluxcd/flux-get-started
ref: master
path: charts/ghost
values:
Expand Down

0 comments on commit 1cbdb18

Please sign in to comment.