* feat(upgrade): allow skipping missing values files
This allows fixing previous chart versions in a single pull request
without applying a major version bump to the chart version.
Signed-off-by: Jacob LeGrone <git@jacob.work>
* test(skip-missing-values): validate config and HasCIValuesFile method
Signed-off-by: Jacob LeGrone <git@jacob.work>
* docs(skip-missing-values): generate documentation
Signed-off-by: Jacob LeGrone <git@jacob.work>
* fix(chart): switch to filepath from path
Signed-off-by: Jacob LeGrone <git@jacob.work>
* Add helm/kubectl integration test
Signed-off-by: Jacob LeGrone <git@jacob.work>
* Use Chart type from integration tests
Signed-off-by: Jacob LeGrone <git@jacob.work>
* Update .circleci/config.yml
Co-Authored-By: jlegrone <jlegrone@users.noreply.github.com>
Signed-off-by: Jacob LeGrone <git@jacob.work>
* Remove extraneous test chart files
Signed-off-by: Jacob LeGrone <git@jacob.work>
* Fix shellcheck lint
Signed-off-by: Jacob LeGrone <git@jacob.work>
* Remove example kind config from e2e tests
Signed-off-by: Jacob LeGrone <git@jacob.work>
* Remove breaking semver test
This wasn't super clear and was no longer working properly
after the switch to git-worktree.
Signed-off-by: Jacob LeGrone <git@jacob.work>
* Bump kind version
Signed-off-by: Jacob LeGrone <git@jacob.work>
* Test chart upgrades against previous version
Upgrade testing will be run if the --upgrade flag is set (default true)
and chart version increment does not indicate a breaking change
according to the SemVer 2.0 spec.
Any releases associated with previous chart versions which fail to roll
out or for which an initial `helm test` fails will be ignored.
Signed-off-by: Jacob LeGrone <git@jacob.work>
* fix(dep): add version constraint for github.com/otiai10/copy
Signed-off-by: Jacob LeGrone <git@jacob.work>
* refactor(git): checkout whole repository with worktree
Signed-off-by: Jacob LeGrone <git@jacob.work>
* Rename test* to do*
Signed-off-by: Jacob LeGrone <git@jacob.work>
* Return bool, error from BreakingChangeAllowed
Signed-off-by: Jacob LeGrone <git@jacob.work>
* Use errors.Wrapf
Co-Authored-By: jlegrone <jlegrone@users.noreply.github.com>
Signed-off-by: Jacob LeGrone <git@jacob.work>
* Explicitly disable upgrade when not install
Signed-off-by: Jacob LeGrone <git@jacob.work>
Allows to identify chart changes before actually running
lint or install commands. This can be useful in the following
cases:
* In a CI setup where kind clusters are spun up on the fly,
this makes it possible to decide whether a cluster is necessary
at all. A PR may only contain changes that are not relevant
to any charts.
* By knowing upfront which charts have changed, it is
possible to load a per-chart CI configuration which would
allows us to determine the number of nodes needed in a kind
cluster. For most charts, one node is enough, but in certain
scenarios, especially for StatefulSets, we may want to test
with pod anti-affinity where replicas have to be spread across
multiple nodes.
Signed-off-by: Reinhard Nägele <unguiculus@gmail.com>
* Use kind release from GitHub instead of 'go get sigs.k8s.io/kind'
* Run ct container with '--network host' to avoid patching kubeconfig
* Create multi-node cluster with one master and three worker nodes
so pods with anti-affinity can be tested
* Improve wait logic to cater for multiple nodes
* Add log statements
* Remote unnecessary 'k8s' remote to avoid confusion
* Extract function for 'docker exec' calls
Signed-off-by: Reinhard Nägele <unguiculus@gmail.com>
Simplifies the logic and no longer requires that flags be
listed individually in order to get bound.
Signed-off-by: Reinhard Nägele <unguiculus@gmail.com>
Fixes a regression introduced in #73 so that chart directories were no longer required to be in a direct subdirectory of configured chart directories.
This caused problems in https://github.com/helm/charts/pull/10830.
cc @munnerz
* Fix regression in changed chart detection
Please enter the commit message for your changes. Lines starting
Signed-off-by: Reinhard Nägele <unguiculus@gmail.com>
* Refactor to consider charts at root
Signed-off-by: Reinhard Nägele <unguiculus@gmail.com>
* Make sure charts are processed only once
Signed-off-by: Reinhard Nägele <unguiculus@gmail.com>
* Fix typo
Signed-off-by: Reinhard Nägele <unguiculus@gmail.com>
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