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

33 Commits

Author SHA1 Message Date
Artur Shad Nik
2af5e2357f feat: add --wait flag to helm uninstall (#721)
Signed-off-by: Artur Shad Nik <arturshadnik@gmail.com>
2025-06-02 12:32:00 +02:00
PaoloGallina
5bde7c54d4 feat(upgrade): using the values instead of --reuse-values (#742)
Signed-off-by: Paolo Gallina <paologallina1992@gmail.com>
2025-06-02 10:30:49 +02:00
dependabot[bot]
a3f2df35e1 Bump golangci/golangci-lint-action from 6.5.2 to 8.0.0 (#736)
* Bump golangci/golangci-lint-action from 6.5.2 to 8.0.0

Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 6.5.2 to 8.0.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](55c2c1448f...4afd733a84)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-version: 8.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* migrate config

Signed-off-by: Carlos Panato <ctadeu@gmail.com>

* fix lints

Signed-off-by: Carlos Panato <ctadeu@gmail.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Carlos Panato <ctadeu@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Carlos Panato <ctadeu@gmail.com>
2025-05-06 10:27:43 +02:00
Carlos Tadeu Panato Junior
a67573475c add helm lint extra args (#605)
Signed-off-by: cpanato <ctadeu@gmail.com>
2023-11-02 17:46:00 +01:00
João "Pisco" Fernandes
0cb17e5aa8 feat(helm): Add support for OCI chart repositories (#445)
Signed-off-by: João Fernandes <jcsf_1995@hotmail.com>
2023-10-27 14:13:16 +02:00
Joe Julian
d8fe2ba87c Sort event list (#584)
It's much easier to see the order of actions when the events are sorted
by lastTimestamp. This adds that flag to the GetEvents function.

Signed-off-by: Joe Julian <me@joejulian.name>
2023-08-16 03:04:53 +02:00
Anders Bennedsgaard
0d4ab8035a add --extra-helm-args to ct lint (#552)
Signed-off-by: AndersBennedsgaard <abbennedsgaard@gmail.com>
2023-07-10 10:00:43 +00:00
Marco Lecheler
6f100eb93b feat: verify if targetBranch is present in git repo (#511)
* feat: verify if targetBranch is present in git repo

If a targetBranch is not present in the git repository the `ct list-changed` command will fail.
The error message for this is not really meaningful.

This commit will validate if the branch exists and throw a error message which the user will understand.

closes #330

Signed-off-by: Marco Lecheler <marco@task.media>

* chore(test): mocking test for chart.BranchExists()

Signed-off-by: Marco Lecheler <marco@task.media>

* fix(lint): use fmt.Errorf for error msg

Signed-off-by: Marco Lecheler <marco@task.media>

---------

Signed-off-by: Marco Lecheler <marco@task.media>
2023-04-14 00:30:46 +02:00
Carlos Tadeu Panato Junior
7f3a83ddc5 sync version comments, update actions and update cosign flag (#538)
* sync version comments, update actions and update cosign flag

Signed-off-by: cpanato <ctadeu@gmail.com>

* fix lints

Signed-off-by: cpanato <ctadeu@gmail.com>

---------

Signed-off-by: cpanato <ctadeu@gmail.com>
2023-03-24 12:24:35 +00:00
Usman
98f96d2064 Fix parsing kubectl output with warnings (#470)
* Fix for getting deployments

Don't parse error output (e.g. deprecation warnings) when trying to list deployments.

Signed-off-by: Usman <akeju00+github@gmail.com>

* Fix more output parsing

Signed-off-by: usmonster <akeju00+github@gmail.com>

Signed-off-by: Usman <akeju00+github@gmail.com>
Signed-off-by: usmonster <akeju00+github@gmail.com>
2022-12-12 10:08:52 +01:00
Sushanta Das
76b2ef0043 reading helm version using template (#474)
Signed-off-by: Sushanta Das <sushanta.das.ju@gmail.com>

Signed-off-by: Sushanta Das <sushanta.das.ju@gmail.com>
2022-09-26 12:12:46 +02:00
Carlos Tadeu Panato Junior
68f3fffe62 Upgrade go1.19, helm update and add golangci-lint job (#460)
* upgrade to go1.19

Signed-off-by: cpanato <ctadeu@gmail.com>

* add golangci-lint

Signed-off-by: cpanato <ctadeu@gmail.com>

* fix lints and Replace github.com/pkg/errors dependency with native error wrapping

Signed-off-by: cpanato <ctadeu@gmail.com>

* update install kind cluster

Signed-off-by: cpanato <ctadeu@gmail.com>

* update tests

Signed-off-by: cpanato <ctadeu@gmail.com>

* use errors.new

Signed-off-by: cpanato <ctadeu@gmail.com>

Signed-off-by: cpanato <ctadeu@gmail.com>
2022-09-16 15:59:15 +02:00
Scott Leggett
048064130d Set a request timeout on kubectl commands (#360)
* feat: add kubectl timeout value to configuration

Signed-off-by: Scott Leggett <scott@sl.id.au>

* fix: set a request timeout on kubectl commands

Simple kubectl commands such as get, describe, and logs should return
quickly, but kubectl does not set a timeout on requests by default.

This can mean kubectl hangs forever if the kubernetes API stops
responding during a request, which is quite possible in CI environments
where jobs may cancelled and kubernetes clusters torn down while ct is
running.

This change sets a configurable timeout on such kubectl commands, with a
default value of 30s.

Signed-off-by: Scott Leggett <scott@sl.id.au>

* chore: update integration test for new kubectl API

Signed-off-by: Scott Leggett <scott@sl.id.au>
2022-07-26 17:16:31 +02:00
Krzysztof Nazarewski
3c014d8d38 introduce helm-dependency-extra-args (#396)
addresses https://github.com/helm/chart-testing/issues/368

Signed-off-by: Krzysztof Nazarewski <3494992+nazarewk@users.noreply.github.com>
2022-04-05 11:50:08 +02:00
Massimiliano Donini
aabb51e7dd Introduce helm-extra-set-args command line parameter (#402)
* Introduce helm-extra-set-args
Signed-off-by: ilmax <massimiliano.donini@gmail.com>

Signed-off-by: Massimiliano Donini <massimiliano.donini@lobsterink.com>

* Fix and add integration test

- Fixed error when no values are passed in
- Added integration test

Signed-off-by: Massimiliano Donini <massimiliano.donini@lobsterink.com>

* Generate docs

Signed-off-by: Massimiliano Donini <massimiliano.donini@lobsterink.com>
2022-03-23 10:24:39 +01:00
Reinhard Nägele
71d0e1e82c Ignore stderr when parsing Helm version (#294)
Helm v3.4.0 logs a warning about URL deprecation which causes semver
parsing to fail. We need to only read stdout and ignore stderr here.

Signed-off-by: Reinhard Nägele <unguiculus@gmail.com>
2020-11-30 18:58:06 +01:00
Torsten Walter
e4d7b78183 Support execution of additional commands during ct lint (#283)
* support execution of additional commands for lint

Given that helm unittest is installed locally or mounted into the chart
testing container one could use this to run helm unittest for each
chart.

```
additional-commands:
 - helm unittest --helm3 -f tests/*.yaml {{ .Path }}
```

The command is treated as a go template. Like this it's possible to get
the path to the chart as in the example. It would also be open for
further extension if needed.

Signed-off-by: Torsten Walter <mail@torstenwalter.de>

* Use sh to execute command

Signed-off-by: Torsten Walter <mail@torstenwalter.de>

Co-authored-by: Reinhard Nägele <unguiculus@gmail.com>

* rename function to NewCmdTemplateExecutor

Signed-off-by: Torsten Walter <mail@torstenwalter.de>

* add error handling

Signed-off-by: Torsten Walter <mail@torstenwalter.de>

* add documentation

Signed-off-by: Torsten Walter <mail@torstenwalter.de>

* use go-shellwords to split rendered command

Signed-off-by: Torsten Walter <mail@torstenwalter.de>

* Update pkg/tool/cmdexecutor.go

Signed-off-by: Torsten Walter <mail@torstenwalter.de>

Co-authored-by: Reinhard Nägele <unguiculus@gmail.com>

* add unit tests

Signed-off-by: Torsten Walter <mail@torstenwalter.de>

Co-authored-by: Reinhard Nägele <unguiculus@gmail.com>
2020-10-20 17:10:56 -04:00
Reinhard Nägele
b8572749f0 Add support for Helm 3 (#184)
Signed-off-by: Reinhard Naegele <unguiculus@gmail.com>
2019-11-28 19:09:20 +01:00
Reinhard Nägele
5b7b21e064 Migrate to Go modules (#183)
* Migrate to Go modules

Signed-off-by: Reinhard Naegele <unguiculus@gmail.com>

* Add 'go mod download'

Signed-off-by: Reinhard Naegele <unguiculus@gmail.com>

* Update machine image

Signed-off-by: Reinhard Naegele <unguiculus@gmail.com>

* Install Go

Signed-off-by: Reinhard Naegele <unguiculus@gmail.com>

* Fix Go installation

Signed-off-by: Reinhard Naegele <unguiculus@gmail.com>

* Fix Go installation

Signed-off-by: Reinhard Naegele <unguiculus@gmail.com>

* Override Go link

Signed-off-by: Reinhard Naegele <unguiculus@gmail.com>

* Do checkout first

Signed-off-by: Reinhard Naegele <unguiculus@gmail.com>

* Fix link

Signed-off-by: Reinhard Naegele <unguiculus@gmail.com>

* Copy go 1.13 binary in place of circle image default binary

Signed-off-by: Scott Rigby <scott@r6by.com>

* Use latest helm v3 version, and remove install_tiller function

Signed-off-by: Scott Rigby <scott@r6by.com>

* Revert "Use latest helm v3 version, and remove install_tiller function"

This reverts commit 63dedab3a2.

Signed-off-by: Scott Rigby <scott@r6by.com>

* Copy full go 1.13 dir into the circle machine default location after deleting initial install

Signed-off-by: Scott Rigby <scott@r6by.com>
2019-11-02 15:44:02 -04:00
Reinhard Nägele
e731d947fb Consider username and password in repo urls (#162)
Signed-off-by: Reinhard Naegele <unguiculus@gmail.com>
2019-07-09 07:24:17 +02:00
Reinhard Nägele
f53c402ee2 Print events on cleanup (#155)
Signed-off-by: Reinhard Nägele <unguiculus@gmail.com>
2019-05-03 08:07:18 +02:00
Reinhard Nägele
e2e0c8cea3 Fix log messages (#152)
Signed-off-by: Reinhard Nägele <unguiculus@gmail.com>
2019-04-25 18:39:03 +02:00
Carlos Tadeu Panato Junior
961a3ab920 Remove force delete of pv and improve cleanup logic (#150)
Signed-off-by: Carlos Panato <ctadeu@gmail.com>
2019-04-24 22:25:13 +02:00
Jacob LeGrone
b060fc83f2 Add git version documentation, rename worktree methods, and handle existing worktree (#133)
Signed-off-by: Jacob LeGrone <git@jacob.work>
2019-03-28 21:46:30 +01:00
Jacob LeGrone
ea18dc6af1 fix(account): handle invalid repository domain matches (#137)
fixes #136 

Signed-off-by: Jacob LeGrone <git@jacob.work>
2019-03-28 20:55:55 +01:00
Jacob LeGrone
de59b1cdfb Test chart upgrades (#103)
* 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>
2019-03-18 11:11:57 -04:00
Carlos Tadeu Panato Junior
010642b8fe Force the namespace deletion by updating the finalizers in the namespace obj (#112)
Signed-off-by: Carlos Panato <ctadeu@gmail.com>
2019-03-04 18:32:33 +01:00
Carlos Tadeu Panato Junior
ebf0014515 Add explicit deletion of pv and pvcs (#119)
Signed-off-by: Carlos Panato <ctadeu@gmail.com>
2019-02-28 14:10:08 +01:00
Reinhard Nägele
868038e2e8 Improve error logging (#91)
Signed-off-by: Reinhard Nägele <unguiculus@gmail.com>
2019-01-23 19:15:12 +01:00
Markus Maga
9084cf16d0 Add support for providing credentials when adding chart-repositories (#67)
Signed-off-by: Markus Maga <markus@nadilus.com>
2019-01-07 21:13:30 +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
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>
2018-11-16 13:53:53 +01: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>
2018-11-07 13:06:20 -05:00