Linting is specific to the chart versions. A v2 and v3 chart will
lint differently.
To accomplish this, packages like engine need to be able to handle
different chart versions. This was accomplished by some changes:
1. The introduction of a Charter interface for charts
2. The ChartAccessor which is able to accept a chart and then
provide access to its data via an interface. There is an
interface, factory, and implementation for each version of
chart.
3. Common packages were moved to a common and util packages.
Due to some package loops, there are 2 packages which may
get some consolidation in the future.
The new interfaces provide the foundation to move the actions
and cmd packages to be able to handle multiple apiVersions of
charts.
Signed-off-by: Matt Farina <matt.farina@suse.com>
The repo package is internally versioned at v1. Repos were designed
to be versioned. This change moves it to a versioned directory the
same way other packages are now being handled.
Signed-off-by: Matt Farina <matt.farina@suse.com>
Problem: Tests used syscall.Umask(0000) which could leave your shell creating
files with 777 permissions if interrupted.
Solution: Instead of changing umask, tests now detect the current umask and
calculate expected permissions after it's applied.
Result: Same test coverage, but safe from system-wide side effects.
Co-authored-by: Jesse Simpson <jesse.simpson36@gmail.com>
Signed-off-by: Scott Rigby <scott@r6by.com>
Use defer outFile.Close() to avoid multiple close calls and ensure proper resource cleanup
Co-authored-by: Andrew Block <andy.block@gmail.com>
Signed-off-by: Scott Rigby <scott@r6by.com>
* Runtime abstraction to encapsulate subprocess code and enable future runtimes
Also fix race condition in TestPrepareCommandExtraArgs by replacing the shared variable modification with a local copy
Co-authored-by: George Jenkins <gvjenkins@gmail.com>
Signed-off-by: Scott Rigby <scott@r6by.com>
* Remove commented out code
Co-authored-by: Joe Julian <me@joejulian.name>
Signed-off-by: Scott Rigby <scott@r6by.com>
* Check test failure string
Co-authored-by: Jesse Simpson <jesse.simpson36@gmail.com>
Signed-off-by: Scott Rigby <scott@r6by.com>
---------
Signed-off-by: Scott Rigby <scott@r6by.com>
Co-authored-by: George Jenkins <gvjenkins@gmail.com>
Co-authored-by: Joe Julian <me@joejulian.name>
Co-authored-by: Jesse Simpson <jesse.simpson36@gmail.com>
A few things are added here:
1. The cache is made to be more generic as a content based cache.
It could be used for other things such as plugins
2. Flags were added to specify the content cache locaiton rather
than rely on the repository cache. Keeping the 2 the same
hid bugs and errors.
3. Tests were added and updated to ensure the cache is used and
tested
Signed-off-by: Matt Farina <matt.farina@suse.com>
This change adds v3 charts. The code for the chart, including a
loader, is present. It is based on v2 charts as a starting point.
Note, this change does not make the charts available for use with
Helm CLI commands or the action package. That will be in follow-up
changes.
Signed-off-by: Matt Farina <matt.farina@suse.com>
The package github.com/pkg/errors was removed via the pull request #13460.
This change did not correctly handle the case in the windows code and CI
did not exercise this to find the error.
Signed-off-by: Matt Farina <matt.farina@suse.com>