-
Notifications
You must be signed in to change notification settings - Fork 224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Factor out testing code from charts #1
Conversation
38e6a54
to
73ba28e
Compare
Please enter the commit message for your changes. Lines starting
helm/charts#5231 updates CI in the charts repo. |
2a8636c
to
20336c4
Compare
20336c4
to
0ae9a47
Compare
/assign @mattfarina @viglesiasce |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks really great! Thanks @unguiculus!
Dockerfile
Outdated
mv kubectl /usr/local/bin/ | ||
|
||
# Install Helm | ||
ARG HELM_VERSION=2.8.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should do Helm last as that is the most likely to change.
Dockerfile
Outdated
py-crcmod \ | ||
py-pip | ||
|
||
RUN STABLE=$(curl -Ls https://storage.googleapis.com/kubernetes-release/release/stable.txt) && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets hard code the version so we know whats in the image based on the commit/tag
README.md
Outdated
|
||
[chartlib.sh](lib/chartlib.sh) is a Bash library with useful function for linting and testing charts. It is well documented and should be easily usable. The script is meant to be sourced and can be configured via environment variables. | ||
|
||
As a convenience, [chartlib.sh](chart_test.sh) is provided. It supports linting and testing charts that have changed against a target branch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be [chart_test.sh]
6a4ad5c
to
7ac277b
Compare
Also: Hard-code version for kubectl.
'chartlib::validate_maintainers' should not log an error if there's no maintainers section. This is already covered by the schema validation.
7ac277b
to
52ea1aa
Compare
Thanks @unguiculus!! |
d961b3f
to
234c872
Compare
+1 from me, I think @mattfarina also wanted to take a quick look |
This is awesome! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really slick. I accidentally ran it over the charts repo and found where all the failures are (summary of that here).
Three things I'd like to see:
- The copyright changed
- After that we move it to the helm org
- We tell all the people's about it. This is great
chart_test.sh
Outdated
@@ -0,0 +1,152 @@ | |||
#!/usr/bin/env bash | |||
|
|||
# Copyright 2018 The Kubernetes Authors. All rights reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just sent an email to the code maintainers on Helm about this. The copyright should change Kubernetes
to Helm
according to the CNCF (who owns both Kubernetes and Helm).
* Re-write it in Go Signed-off-by: Reinhard Nägele <unguiculus@gmail.com> * Fix loading config from home dir Signed-off-by: Reinhard Nägele <unguiculus@gmail.com> * Print config Signed-off-by: Reinhard Nägele <unguiculus@gmail.com> * Remove git gc test code Signed-off-by: Reinhard Nägele <unguiculus@gmail.com> * Remove year in copyright header Signed-off-by: Reinhard Nägele <unguiculus@gmail.com> * Add alias for lint-and-install Signed-off-by: Reinhard Nägele <unguiculus@gmail.com> * Fix examples Signed-off-by: Reinhard Nägele <unguiculus@gmail.com> * Remove OWNERS file Signed-off-by: Reinhard Nägele <unguiculus@gmail.com> * Add docs generation Signed-off-by: Reinhard Nägele <unguiculus@gmail.com> * Update CircleCI Signed-off-by: Reinhard Nägele <unguiculus@gmail.com> * Update readme Signed-off-by: Reinhard Nägele <unguiculus@gmail.com> * Document building and releasing Signed-off-by: Reinhard Nägele <unguiculus@gmail.com> Signed-off-by: Reinhard Nägele <unguiculus@gmail.com> * Remove Makefile Signed-off-by: Reinhard Nägele <unguiculus@gmail.com> * Hide doc-gen command Signed-off-by: Reinhard Nägele <unguiculus@gmail.com> * Add support for Helm extra args Signed-off-by: Reinhard Nägele <unguiculus@gmail.com> * Update tool dependencies Signed-off-by: Reinhard Nägele <unguiculus@gmail.com> * Update Goreleaser Signed-off-by: Reinhard Nägele <unguiculus@gmail.com> * Upgrade pip Signed-off-by: Reinhard Nägele <unguiculus@gmail.com> * Update Gopkg.lock Signed-off-by: Reinhard Nägele <unguiculus@gmail.com> * Add log messages Signed-off-by: Reinhard Nägele <unguiculus@gmail.com> * Fix CircleCI env var for tag Signed-off-by: Reinhard Nägele <unguiculus@gmail.com> * Add Docker login Signed-off-by: Reinhard Nägele <unguiculus@gmail.com> * Readme update for MacOS (#1) * Add build.sh mac prerequisites, and README markdown linting fixes Signed-off-by: Scott Rigby <scott@r6by.com> * Update README.md Signed-off-by: Reinhard Nägele <unguiculus@gmail.com> Signed-off-by: Reinhard Nägele <unguiculus@gmail.com> * Update Gopkg.lock Signed-off-by: Reinhard Nägele <unguiculus@gmail.com> * Update config search locations Signed-off-by: Reinhard Nägele <unguiculus@gmail.com> * Add config files to distro Signed-off-by: Reinhard Nägele <unguiculus@gmail.com> * Add debug flag Signed-off-by: Reinhard Nägele <unguiculus@gmail.com> * Add note on config files for linting Signed-off-by: Reinhard Nägele <unguiculus@gmail.com> * Fix link Signed-off-by: Reinhard Nägele <unguiculus@gmail.com> * Revert "Update Gopkg.lock" This reverts commit fcbfbdc. Signed-off-by: Reinhard Nägele <unguiculus@gmail.com> * Fix link Signed-off-by: Reinhard Nägele <unguiculus@gmail.com> * Fix readme Signed-off-by: Reinhard Nägele <unguiculus@gmail.com>
Factors out chart testing code into a separate library which is provided as Docker image. This also unifies originally separate and somewhat redundant scripts for CircleCI and CI on our Kubernetes cluster.