Skip to content

Commit

Permalink
Use orb for e2e multiple versions of kube (FairwindsOps#236)
Browse files Browse the repository at this point in the history
* Chart test helm3 and helm2 on multiple kube versions. Use orb for e2e to simplify setup

* add the helm init back in for local
  • Loading branch information
Andrew Suderman committed Feb 20, 2020
1 parent d15153c commit b3d6bb3
Show file tree
Hide file tree
Showing 41 changed files with 175 additions and 246 deletions.
102 changes: 66 additions & 36 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
version: 2
version: 2.1

orbs:
rok8s11: fairwinds/rok8s-scripts@11
rok8s10: fairwinds/rok8s-scripts@10

references:
setup_environment: &setup_environment
Expand All @@ -10,11 +14,36 @@ references:
pip install awscli
echo 'Install needed packages'
apk --update add bash jq
# TODO: Once a newer verions of chart-testing with helm 3.1.0 comes out, revisit this
# kind_configuration_helm3: &kind_configuration_helm3
# pre_script: scripts/circle-pre-e2e.sh
# script: scripts/circle-e2e.sh
# command_runner_image: quay.io/helmpack/chart-testing:v3.0.0-beta.1
# requires:
# - lint-scripts
# - lint-charts
# filters:
# branches:
# only: /.*/
# tags:
# ignore: /.*/
kind_configuration_helm2: &kind_configuration_helm2
pre_script: scripts/circle-pre-e2e.sh
script: scripts/circle-e2e.sh
command_runner_image: quay.io/helmpack/chart-testing:v2.4.0
requires:
- lint-scripts
- lint-charts
filters:
branches:
only: /.*/
tags:
ignore: /.*/

jobs:
lint-scripts:
docker:
- image: koalaman/shellcheck-alpine:v0.6.0
- image: koalaman/shellcheck-alpine:v0.7.0
steps:
- checkout
- run:
Expand All @@ -31,7 +60,7 @@ jobs:
done
lint-charts:
docker:
- image: quay.io/helmpack/chart-testing:v2.2.0
- image: quay.io/helmpack/chart-testing:v2.4.0
steps:
- checkout
- *setup_environment
Expand All @@ -41,33 +70,9 @@ jobs:
git remote add ro https://github.com/fairwindsops/charts
git fetch ro master
ct lint --config scripts/ct.yaml --chart-yaml-schema scripts/schema.yaml
e2e-tests:
docker:
- image: quay.io/helmpack/chart-testing:v2.2.0
steps:
- checkout
- setup_remote_docker
- *setup_environment
- run:
name: Install Docker
command: apk --update add docker
- run:
name: Setup e2e Environment
command: |
curl -LO https://github.com/kubernetes-sigs/kind/releases/download/0.2.1/kind-linux-amd64
chmod +x kind-linux-amd64
mv kind-linux-amd64 /usr/local/bin/kind
scripts/e2e-test.sh setup
- run:
name: Run e2e tests
command: |
scripts/e2e-test.sh test "$CIRCLE_BRANCH"
- run:
name: Teardown e2e Environment
command: scripts/e2e-test.sh teardown
sync:
docker:
- image: quay.io/helmpack/chart-testing:v2.2.0
- image: quay.io/helmpack/chart-testing:v2.4.0
steps:
- checkout
- *setup_environment
Expand All @@ -83,14 +88,39 @@ workflows:
jobs:
- lint-scripts
- lint-charts
- e2e-tests:
filters:
branches:
ignore:
- master
requires:
- lint-scripts
- lint-charts
# TODO: Once a newer verions of chart-testing with helm 3.1.0 comes out, revisit this
# - rok8s11/kubernetes_e2e_tests:
# name: "End-To-End Kubernetes 1.14.10 - Helm 3"
# kind_node_image: "kindest/node:v1.14.10@sha256:81ae5a3237c779efc4dda43cc81c696f88a194abcc4f8fa34f86cf674aa14977"
# <<: *kind_configuration_helm3
# - rok8s11/kubernetes_e2e_tests:
# name: "End-To-End Kubernetes 1.15.7 - Helm 3"
# kind_node_image: "kindest/node:v1.15.7@sha256:e2df133f80ef633c53c0200114fce2ed5e1f6947477dbc83261a6a921169488d"
# <<: *kind_configuration_helm3
# - rok8s11/kubernetes_e2e_tests:
# name: "End-To-End Kubernetes 1.16.4 - Helm 3"
# kind_node_image: "kindest/node:v1.16.4@sha256:b91a2c2317a000f3a783489dfb755064177dbc3a0b2f4147d50f04825d016f55"
# <<: *kind_configuration_helm3
# - rok8s11/kubernetes_e2e_tests:
# name: "End-To-End Kubernetes 1.17.0 - Helm 3"
# kind_node_image: "kindest/node:v1.17.0@sha256:9512edae126da271b66b990b6fff768fbb7cd786c7d39e86bdf55906352fdf62"
# <<: *kind_configuration_helm3
- rok8s10/kubernetes_e2e_tests:
name: "End-To-End Kubernetes 1.14.10 - Helm 2"
kind_node_image: "kindest/node:v1.14.10@sha256:81ae5a3237c779efc4dda43cc81c696f88a194abcc4f8fa34f86cf674aa14977"
<<: *kind_configuration_helm2
- rok8s10/kubernetes_e2e_tests:
name: "End-To-End Kubernetes 1.15.7 - Helm 2"
kind_node_image: "kindest/node:v1.15.7@sha256:e2df133f80ef633c53c0200114fce2ed5e1f6947477dbc83261a6a921169488d"
<<: *kind_configuration_helm2
- rok8s10/kubernetes_e2e_tests:
name: "End-To-End Kubernetes 1.16.4 - Helm 2"
kind_node_image: "kindest/node:v1.16.4@sha256:b91a2c2317a000f3a783489dfb755064177dbc3a0b2f4147d50f04825d016f55"
<<: *kind_configuration_helm2
- rok8s10/kubernetes_e2e_tests:
name: "End-To-End Kubernetes 1.17.0 - Helm 2"
kind_node_image: "kindest/node:v1.17.0@sha256:9512edae126da271b66b990b6fff768fbb7cd786c7d39e86bdf55906352fdf62"
<<: *kind_configuration_helm2
- sync:
requires:
- lint-scripts
Expand Down
7 changes: 4 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
## Guidelines on Contributing

* Lint your changes:
* `docker run --rm -it -v ${PWD}:/charts -w /charts quay.io/helmpack/chart-testing:v2.0.1 ct lint --chart-yaml-schema scripts/schema.yaml --chart-dirs incubator --chart-dirs stable`
* `docker run --rm -it -v ${PWD}:/charts -w /charts quay.io/helmpack/chart-testing:v2.4.0 ct lint --chart-yaml-schema scripts/schema.yaml --chart-dirs incubator --chart-dirs stable`
* End-to-end test your changes:
* Install [kind 0.2.1+](https://github.com/kubernetes-sigs/kind/releases)
* Install [kind 0.7.0+](https://github.com/kubernetes-sigs/kind/releases)
* Install [chart-testing (ct)](https://github.com/helm/chart-testing/releases)
* `scripts/e2e-test.sh setup` to set up Kubernetes in Docker
* `scripts/e2e-test.sh test-local` to test your local changes until they pass
* `scripts/e2e-test.sh test` to test your local changes until they pass
* `scripts/e2e-test.sh teardown` when you are done testing to delete your cluster
* Submit a PR
* Follow the [Chart Guidelines](#Chart Guidelines)
Expand Down
2 changes: 1 addition & 1 deletion incubator/autospotting/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
appVersion: "1.0.0"
description: A chart to install autospotting.
name: autospotting
version: 0.2.0
version: 0.2.1
maintainers:
- name: sudermanjr
- name: coreypobrien
2 changes: 1 addition & 1 deletion incubator/basic-demo/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ apiVersion: v1
appVersion: "1.0"
description: A Basic Kubernetes Demo Chart
name: basic-demo
version: 0.3.0
version: 0.3.2
maintainers:
- name: sudermanjr
2 changes: 1 addition & 1 deletion incubator/capsize/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ apiVersion: v1
appVersion: "1.0"
description: A Helm chart to restart deployments at an interval
name: capsize
version: 0.1.3
version: 0.1.5
maintainers:
- name: sudermanjr
2 changes: 1 addition & 1 deletion incubator/custom-iptables/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ apiVersion: v1
appVersion: "1.0"
description: A Helm chart to install custom iptables rules based on https://github.com/bowei/k8s-custom-iptables/blob/master/run.sh
name: custom-iptables
version: 0.2.0
version: 0.2.1
maintainers:
- name: sudermanjr
2 changes: 1 addition & 1 deletion incubator/fairwinds-metrics/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
appVersion: "v0.5.0"
description: A Helm chart for running Fairwinds Custom Metrics
name: fairwinds-metrics
version: 0.4.0
version: 0.4.1
maintainers:
- name: sudermanjr
- name: mjhuber
2 changes: 1 addition & 1 deletion incubator/fluentd/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
appVersion: "0.12.43"
description: Fluentd for multiple endpoints
name: fluentd
version: 4.1.0
version: 4.1.1
maintainers:
- name: dosullivan
- name: coreypobrien
2 changes: 1 addition & 1 deletion incubator/gke-node-termination-handler/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
appVersion: "1.0"
description: This helm chart provides an adapter for translating GCE node termination events to graceful pod terminations in Kubernetes.
name: gke-node-termination-handler
version: 0.1.0
version: 0.1.1
maintainers:
- name: mjhuber
- name: bbensky
Expand Down
2 changes: 1 addition & 1 deletion incubator/helm-release-pruner/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ apiVersion: v1
appVersion: 1.1.0
description: This charts launches a cronjob to purge stale Helm releases and associated namespaces
name: helm-release-pruner
version: 1.3.0
version: 1.3.1
maintainers:
- name: coreypobrien
2 changes: 1 addition & 1 deletion incubator/imagepullsecret-deploy/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: v1
appVersion: "0.1"
description: A Helm chart to deploy imagePullSecret into a namespace.
name: imagepullsecret-deploy
version: 1.0.0
version: 1.0.1
maintainers:
- name: crmejia
home: https://https://www.fairwinds.com/
2 changes: 1 addition & 1 deletion incubator/kubebench/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ apiVersion: v1
appVersion: "1.0"
description: A helm chart to run kube-bench regularly and export any findings as a datadog event.
name: kubebench
version: 1.0.2
version: 1.0.3
maintainers:
- name: mjhuber
2 changes: 1 addition & 1 deletion incubator/letsencrypt-setup/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: letsencrypt-setup
apiVersion: v1
version: v2.1.0
version: v2.1.1
appVersion: v0.11.1
description: Setup clusterIssuers for cert-manager
maintainers:
Expand Down
2 changes: 1 addition & 1 deletion incubator/load-generator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ apiVersion: v1
appVersion: "1.0"
description: A Helm chart that uses k6 to generate load
name: load-generator
version: 0.1.1
version: 0.1.2
maintainers:
- name: sudermanjr
2 changes: 1 addition & 1 deletion incubator/logentries/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ apiVersion: v1
appVersion: "1.0"
description: A Helm chart for managing LogEntries Kubernetes agent
name: logentries
version: 0.2.1
version: 0.2.2
maintainers:
- name: mjhuber
21 changes: 0 additions & 21 deletions incubator/node-problem-detector/.helmignore

This file was deleted.

7 changes: 0 additions & 7 deletions incubator/node-problem-detector/Chart.yaml

This file was deleted.

13 changes: 0 additions & 13 deletions incubator/node-problem-detector/README.md

This file was deleted.

41 changes: 0 additions & 41 deletions incubator/node-problem-detector/templates/daemonset.yaml

This file was deleted.

4 changes: 0 additions & 4 deletions incubator/node-problem-detector/values.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion incubator/opa/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ apiVersion: v1
appVersion: "0.0.1"
description: A Helm chart to manage opa
name: opa
version: 0.1.2
version: 0.1.3
maintainers:
- name: sudermanjr
2 changes: 1 addition & 1 deletion incubator/ro-cert-manager/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: ro-cert-manager
apiVersion: v1
version: v3.0.0
version: v3.0.1
appVersion: v0.8.1
description: Install cert-manager and setup CA cluster-issuers
maintainers:
Expand Down
2 changes: 1 addition & 1 deletion incubator/route53sync/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ apiVersion: v1
appVersion: "1.0"
description: A Helm chart for Kubernetes
name: route53sync
version: 0.1.1
version: 0.1.2
maintainers:
- name: sudermanjr
2 changes: 1 addition & 1 deletion incubator/stackdriver-metrics-adapter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
appVersion: "0.10.0"
description: The stackdriver metrics adapter
name: stackdriver-metrics-adapter
version: 0.1.0
version: 0.1.1
maintainers:
- name: mjhuber
email: micah@fairwinds.com
Loading

0 comments on commit b3d6bb3

Please sign in to comment.