Skip to content
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

Merged
merged 31 commits into from
Jun 6, 2018

Conversation

unguiculus
Copy link
Member

@unguiculus unguiculus commented Apr 24, 2018

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.

 Please enter the commit message for your changes. Lines starting
@unguiculus
Copy link
Member Author

helm/charts#5231 updates CI in the charts repo.

@unguiculus
Copy link
Member Author

/assign @mattfarina @viglesiasce

Copy link

@viglesiasce viglesiasce left a 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

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) && \

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.

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]

@unguiculus unguiculus changed the title [WIP] Factor out testing code from charts Factor out testing code from charts May 2, 2018
unguiculus added 3 commits May 2, 2018 10:32
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.
@viglesiasce
Copy link

Thanks @unguiculus!!

@unguiculus
Copy link
Member Author

cc @lachie83 @prydonius @scottrigby

@prydonius
Copy link
Member

+1 from me, I think @mattfarina also wanted to take a quick look

@rendhalver
Copy link

This is awesome!

Copy link
Collaborator

@mattfarina mattfarina left a 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:

  1. The copyright changed
  2. After that we move it to the helm org
  3. 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.
Copy link
Collaborator

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).

@mattfarina mattfarina merged commit 96d2ce7 into helm:master Jun 6, 2018
@unguiculus unguiculus deleted the feature/testing branch October 19, 2018 22:03
scottrigby pushed a commit that referenced this pull request Nov 7, 2018
* 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>
unguiculus added a commit that referenced this pull request Apr 2, 2020
This reverts commit 5cb2b8c because it
prevented releasing bug fixes for previous versions from non-master
branches.

Signed-off-by: Reinhard Naegele <unguiculus@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants