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>
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
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>
* 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>
* 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>
* 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>
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>
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>
* [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