1
0
mirror of https://github.com/helm/chart-testing.git synced 2026-02-05 09:45:14 +01:00
Commit Graph

40 Commits

Author SHA1 Message Date
Carlos Tadeu Panato Junior
46dc82e972 Add new flags to disable lint/schema validation (#68)
Signed-off-by: cpanato <ctadeu@gmail.com>
2018-12-21 07:44:55 +01:00
Reinhard Nägele
d3c13acf95 Truncate names to 63 characters (#69)
There are charts with very long names which cause namespace and
release names to exceed the max length of 63 characters. We, thus,
need to truncate long names. Truncation is done from the left in
order to preserve build ids and randomly generated suffixes.

Signed-off-by: Reinhard Nägele <unguiculus@gmail.com>
2018-12-20 12:08:31 -05:00
Jacob LeGrone
3ce597ad11 feat(lint): validate values files in ci directory (#66)
Signed-off-by: Jacob LeGrone <git@jacob.work>
2018-12-18 17:17:55 +01:00
Jacob LeGrone
228603701a Support installation to existing namespace (#59)
This PR adds two flags to the `install` command: `namespace` and `release-label`. If `namespace` is specified, releases will target that namespace and `release-label` will be used to select deployments and pods for readiness and reading log output.

Fixes #34
2018-12-14 15:30:36 +01:00
Reinhard Nägele
09eff4860c Fix typos (#65) 2018-12-10 17:33:34 +01:00
Rimas Mocevicius
045a8d4179 Add github templates (#52)
Signed-off-by: rimas <rmocius@gmail.com>
2018-11-28 21:03:24 +01:00
Rimas Mocevicius
e4512cbf9f Add kind example (#61)
Signed-off-by: rimas <rmocius@gmail.com>
2018-11-28 20:53:10 +01:00
Reinhard Nägele
ff2ec516e6 Update base images in samples (#58)
Signed-off-by: Reinhard Nägele <unguiculus@gmail.com>
2018-11-16 14:41:29 +01:00
Reinhard Nägele
739aa607a8 Fix readiness check (#57)
Readiness check should happen before tests are executed. Otherwise
the fails if there are tests and test pods match the label selectors
that identify pods. Since test pods have status Completed, they
cause the readiness check to fail.

Signed-off-by: Reinhard Nägele <unguiculus@gmail.com>
v2.0.1
2018-11-16 13:53:53 +01:00
Bernhard (Sonny) Köhler
b1c8894732 fixes bug inside of LintChart() (#55)
ValidateMaintainers() should only be called when the respective config
element is set to true.

Signed-off-by: Sonny Garcia <sonnygarcia@icloud.com>
2018-11-16 13:30:10 +01:00
Reinhard Nägele
73f35d7fcb Explicitly disable version checks when all or specific charts are tested (#56)
It is already documented that the check is disabled in this case.

Signed-off-by: Reinhard Nägele <unguiculus@gmail.com>
2018-11-16 13:25:34 +01:00
Reinhard Nägele
5dfe136c84 Bind debug flag to Viper (#50)
The flag wasn't bound to Viper. Setting it would have no effect.

Signed-off-by: Reinhard Nägele <unguiculus@gmail.com>
2018-11-13 20:53:07 +01:00
Rimas Mocevicius
e5f3cd4eaf Fix wrong docker image tag for docker4mac (#51)
Signed-off-by: rimas <rmocius@gmail.com>
2018-11-13 11:32:56 +01:00
Scott Rigby
1b4319ce80 Helm code of conduct. Fixes #48 (#49)
Signed-off-by: Scott Rigby <scott@r6by.com>
2018-11-12 18:46:41 +01:00
Scott Rigby
ba018fb0c3 Document supported versions, upgrading, and version-specific PRs (#47)
Signed-off-by: Scott Rigby <scott@r6by.com>
2018-11-09 16:08:18 +01:00
Michał Sochoń
09a6f114ae Update readme (#44)
* Update readme

* fix urls so that they are absolute
* add link to docker tags
* minor formatting

Signed-off-by: Michał Sochoń <kaszpir@gmail.com>

* ensure that titles follow standards in README.md

Signed-off-by: Michał Sochoń <kaszpir@gmail.com>

* Spell check across README.md

Signed-off-by: Michał Sochoń <kaszpir@gmail.com>

* Ensure docs describe order of loading of config files

Signed-off-by: Michał Sochoń <kaszpir@gmail.com>

* Remove colon from title in README.md

Signed-off-by: Michał Sochoń <kaszpir@gmail.com>
2018-11-09 09:30:01 -05:00
Reinhard Nägele
f632cd5081 Re-write it in Go (#35)
* 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 fcbfbdc9db.

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>
v2.0.0
2018-11-07 13:06:20 -05:00
Michał Sochoń
8e23ec2d74 Ensure Dockerfile uses more modern pip verison, freeze it to 18.1 (#37)
* Ensure Dockerfile uses more modern pip verison, freeze it to 18.1

Signed-off-by: Michał Sochoń <kaszpir@gmail.com>

* Update Dockerfile

Signed-off-by: Reinhard Nägele <unguiculus@gmail.com>
2018-11-05 19:50:32 +01:00
Michał Sochoń
b019038d46 Ensure kubectl is updated to v1.12.2 (#38)
Signed-off-by: Michał Sochoń <kaszpir@gmail.com>
2018-11-05 19:49:12 +01:00
Michał Sochoń
244e7f0286 Ensure helm is updated to v2.11.0 (#39)
Signed-off-by: Michał Sochoń <kaszpir@gmail.com>
2018-11-05 19:48:58 +01:00
Michał Sochoń
a6e9f1500e Ensure yq is updated to 2.7.0 (#40)
Signed-off-by: Michał Sochoń <kaszpir@gmail.com>
2018-11-05 19:48:40 +01:00
Michał Sochoń
93665addf3 Ensure yamllint is updated to 1.12.1 (#41)
Signed-off-by: Michał Sochoń <kaszpir@gmail.com>
2018-11-05 19:48:04 +01:00
Dan Carley
4960e30445 Return correct exit code when using values files (#32)
* Return correct exit code when using values files

The return values from the individual calls to `lint_chart_with_single_config`
are masked by the other operations in the `lint_chart_with_all_configs`
function.

When `helm lint` reports an error to STDERR but the chart is incorrectly
given a success tick and the exit code of `chart_test.sh` is 0 for
success. An example using `quay.io/helmpack/chart-testing:v1.1.0`:

    ==> Linting charts/nomad-server
    [ERROR] templates/: render error in "nomad-server/templates/nomad-server.yaml": template: nomad-server/templates/nomad-server.yaml:55:28: executing "nomad-server/templates/nomad-server.yaml" at <{{template "fullname...>: template "fullname" not defined

    Error: 1 chart(s) linted, 1 chart(s) failed
    --------------------------------------------------------------------------------
     ✔︎ charts/nomad-server
    --------------------------------------------------------------------------------
     dcarley@cci-mbp  ~/p/g/s/g/c/circle-external-services-chart   master  echo $?
    0s

Fix this by copying the pattern used in other functions of tracking
failures in a local boolean variable and using that to determine the
return code at the end of the function. This is the result after:

    ==> Linting charts/nomad-server
    [ERROR] templates/: render error in "nomad-server/templates/nomad-server.yaml": template: nomad-server/templates/nomad-server.yaml:55:28: executing "nomad-server/templates/nomad-server.yaml" at <{{template "fullname...>: template "fullname" not defined

    Error: 1 chart(s) linted, 1 chart(s) failed
    --------------------------------------------------------------------------------
     ✖︎  charts/nomad-server
    --------------------------------------------------------------------------------
     ✘ dcarley@cci-mbp  ~/p/g/s/g/c/circle-external-services-chart   master  echo $?
    1

There are probably other bugs like this. Shell scripting does not
provide safe error handling for these cases and it's difficult to write
unit tests for. This is another good reason why the proposal in #29 to
re-implement in another language is a good idea.

Signed-off-by: Dan Carley <dan.carley@gmail.com>

* Make error handling for functions consistent

The `|| error=true` pattern is already used in a few other places. This
makes the change from 64c1e52 consistent with the others.

Signed-off-by: Dan Carley <dan.carley@gmail.com>
2018-10-01 18:05:46 +02:00
Ducas Francis
6c1b24b399 Use characters before first equals sign for repo name (#31)
Signed-off-by: Ducas Francis <ducas@ducasfrancis.com>
2018-09-26 20:38:22 +02:00
Matt Farina
75ee8d5b87 Prepping for v1.1.0 release (#28)
Signed-off-by: Matt Farina <matt@mattfarina.com>
v1.1.0
2018-09-24 14:37:16 -04:00
Rimas Mocevicius
48e81aaa43 Add an option to force install of all/single charts (#24)
* Add an option to force install of all/single chart

Signed-off-by: rimas <rmocius@gmail.com>

* replace flag `--force` with `--chart-all`
add an option to list charts for `--chart` flag

Signed-off-by: rimas <rmocius@gmail.com>

* address mattfarina and unguiculus comments

Signed-off-by: rimas <rmocius@gmail.com>

* fixing merge conflicts

Signed-off-by: rimas <rmocius@gmail.com>

* fixing merge conflicts 2

Signed-off-by: rimas <rmocius@gmail.com>

* fixing merge conflicts 3

Signed-off-by: rimas <rmocius@gmail.com>

* exporting CHECK_VERSION_INCREMENT before chart_lib.sh is sourced

Signed-off-by: rimas <rmocius@gmail.com>

* fix --chart -> --charts

Signed-off-by: rimas <rmocius@gmail.com>

* print skip version check before env vars

Signed-off-by: rimas <rmocius@gmail.com>

* Fix readme

Signed-off-by: Reinhard Nägele <unguiculus@gmail.com>
2018-09-21 09:58:02 -04:00
Baargav
9dfea37f89 Fix typo in Readme (#26)
Signed-off-by: Baargav Raghavan <baargav.raghavan@indexexchange.com>
2018-09-20 14:07:17 +02:00
Matt Farina
0e96d077cd Updated image details to point people to Quay (#22) 2018-09-18 17:28:25 +02:00
Matt Farina
f5d8145fdf Adding ability to skip version increment check (#23)
The use case for this is an environment where every change is not
a new release of a chart. When new releases are created the
increment can be checked while development outside a release
does not need to check for it

Signed-off-by: Matt Farina <matt@mattfarina.com>
2018-09-13 22:02:20 +02:00
Reinhard Nägele
0a4282369e Revert permission changes from #13 (#21)
These changes caused a number of problems for charts CI. If users
need this, they should extend the image.

Signed-off-by: Reinhard Nägele <unguiculus@gmail.com>
v1.0.5
2018-09-11 22:14:31 +02:00
Reinhard Nägele
3b5e7fa1c1 Fix exit code when test with multiple custom CI values files fails (#18)
Signed-off-by: Reinhard Nägele <unguiculus@gmail.com>
2018-09-11 15:56:47 +02:00
Reinhard Nägele
d44ae53fa3 Fix regression in docker-for-mac sample (#17) 2018-09-11 15:49:54 +02:00
Rimas Mocevicius
2f8115e1d5 Prettify docker4mac script (#15)
Signed-off-by: rimas <rmocius@gmail.com>
2018-09-10 21:33:26 +02:00
Erikas Mazrimas
31ee629a8f Use environment variable for Github address (#11)
Add short description about GITHUB_INSTANCE env var

Echo GITHUB_INSTANCE with other environment variables
2018-08-29 11:51:10 -04:00
Matteo Gazzetta
afdaae66db Helm 2.10 and fix permissions (#13)
* Helm 2.10.0

* Fix helm init with uid
2018-08-29 11:46:44 -04:00
Rimas Mocevicius
64c0eef72c [fix]: Limits release name to 29 characters. (#14)
* Limits release name to 29 characters.
Fixes an issue https://github.com/helm/charts/pull/7320#issuecomment-416213125

Signed-off-by: rimas <rmocius@gmail.com>

* fix linting errors

Signed-off-by: rimas <rmocius@gmail.com>

* fix linting errors

Signed-off-by: rimas <rmocius@gmail.com>

* cut random_suffix to 10 long

Signed-off-by: rimas <rmocius@gmail.com>

* cut release name to 10 long

Signed-off-by: rimas <rmocius@gmail.com>
2018-08-29 11:30:43 -04:00
Reinhard Nägele
872427955d Add sample for Docker for Mac (#12) 2018-08-29 11:27:56 -04:00
Reinhard Nägele
c52f1dd7d5 Double-check pod readiness for deployments (#10) 2018-08-15 21:48:02 +02:00
Reinhard Nägele
96d2ce7c0e Factor out testing code from charts (#1)
* [WIP] Factor out testing code from charts

* Minor various fixes

 Please enter the commit message for your changes. Lines starting

* Start readme

* Update readme and add GKE example

* Add CircleCI job for ShellCheck

* Install Helm and kubectl after other tools

Also: Hard-code version for kubectl.

* Fix readme

* Update maintainer validation

'chartlib::validate_maintainers' should not log an error if there's no maintainers
section. This is already covered by the schema validation.

* Add random suffix to namespaces

* Improve container logs output

* Improve logging

* Add --cleanup flag to 'helm test'

* Improve namespace cleanup

* Improve logging

* Add random suffixes to releases

* Update logging and Docker image version

* Update GKE example

* Fix Bash array declarations

* Remove user from Docker image

* Add summary

* Use kubectl rollout status for deployments

* Add some more fixes

* Build dependencies before linting

* Fix array initialization

* Increase sleep time for namespace polling

* Add missing colon

* Create v1.0.0

* Update Helm to v2.9.1

* Add missing local keywords

* Bump image version

* Update copyright headers
2018-06-06 09:42:53 -04:00
Reinhard Nägele
d472a4a8f0 Initial commit 2018-04-24 11:32:38 +02:00