mirror of
https://github.com/helm/chart-testing.git
synced 2026-02-05 18:45:18 +01:00
Signed-off-by: Marc Sensenich <sensenichm91@gmail.com>
This commit is contained in:
@@ -63,6 +63,7 @@ func addCommonFlags(flags *pflag.FlagSet) {
|
||||
flags.StringVar(&cfgFile, "config", "", "Config file")
|
||||
flags.String("remote", "origin", "The name of the Git remote used to identify changed charts")
|
||||
flags.String("target-branch", "master", "The name of the target branch used to identify changed charts")
|
||||
flags.String("since", "HEAD", "The Git reference used to identify changed charts")
|
||||
flags.StringSlice("chart-dirs", []string{"charts"}, heredoc.Doc(`
|
||||
Directories containing Helm charts. May be specified multiple times
|
||||
or separate values with commas`))
|
||||
|
||||
@@ -26,4 +26,4 @@ in given chart directories.
|
||||
* [ct list-changed](ct_list-changed.md) - List changed charts
|
||||
* [ct version](ct_version.md) - Print version information
|
||||
|
||||
###### Auto generated by spf13/cobra on 21-Mar-2019
|
||||
###### Auto generated by spf13/cobra on 21-Apr-2020
|
||||
|
||||
@@ -59,6 +59,7 @@ ct install [flags]
|
||||
--release-label string The label to be used as a selector when inspecting resources created by charts.
|
||||
This is only used if namespace is specified (default "app.kubernetes.io/instance")
|
||||
--remote string The name of the Git remote used to identify changed charts (default "origin")
|
||||
--since string The Git reference used to identify changed charts (default "HEAD")
|
||||
--skip-missing-values When --upgrade has been passed, this flag will skip testing CI values files from the
|
||||
previous chart revision if they have been deleted or renamed at the current chart
|
||||
revision
|
||||
@@ -71,4 +72,4 @@ ct install [flags]
|
||||
|
||||
* [ct](ct.md) - The Helm chart testing tool
|
||||
|
||||
###### Auto generated by spf13/cobra on 21-Mar-2019
|
||||
###### Auto generated by spf13/cobra on 21-Apr-2020
|
||||
|
||||
@@ -50,6 +50,7 @@ ct lint-and-install [flags]
|
||||
--release-label string The label to be used as a selector when inspecting resources created by charts.
|
||||
This is only used if namespace is specified (default "app.kubernetes.io/instance")
|
||||
--remote string The name of the Git remote used to identify changed charts (default "origin")
|
||||
--since string The Git reference used to identify changed charts (default "HEAD")
|
||||
--skip-missing-values When --upgrade has been passed, this flag will skip testing CI values files from the
|
||||
previous chart revision if they have been deleted or renamed at the current chart
|
||||
revision
|
||||
@@ -66,4 +67,4 @@ ct lint-and-install [flags]
|
||||
|
||||
* [ct](ct.md) - The Helm chart testing tool
|
||||
|
||||
###### Auto generated by spf13/cobra on 21-Mar-2019
|
||||
###### Auto generated by spf13/cobra on 21-Apr-2020
|
||||
|
||||
@@ -54,6 +54,7 @@ ct lint [flags]
|
||||
is searched in the current directory, '$HOME/.ct', and '/etc/ct', in
|
||||
that order
|
||||
--remote string The name of the Git remote used to identify changed charts (default "origin")
|
||||
--since string The Git reference used to identify changed charts (default "HEAD")
|
||||
--target-branch string The name of the target branch used to identify changed charts (default "master")
|
||||
--validate-chart-schema Enable schema validation of 'Chart.yaml' using Yamale (default: true) (default true)
|
||||
--validate-maintainers Enable validation of maintainer account names in chart.yml (default: true).
|
||||
@@ -65,4 +66,4 @@ ct lint [flags]
|
||||
|
||||
* [ct](ct.md) - The Helm chart testing tool
|
||||
|
||||
###### Auto generated by spf13/cobra on 21-Mar-2019
|
||||
###### Auto generated by spf13/cobra on 21-Apr-2020
|
||||
|
||||
@@ -21,6 +21,7 @@ ct list-changed [flags]
|
||||
or separate values with commas
|
||||
-h, --help help for list-changed
|
||||
--remote string The name of the Git remote used to identify changed charts (default "origin")
|
||||
--since string The Git reference used to identify changed charts (default "HEAD")
|
||||
--target-branch string The name of the target branch used to identify changed charts (default "master")
|
||||
```
|
||||
|
||||
@@ -28,4 +29,4 @@ ct list-changed [flags]
|
||||
|
||||
* [ct](ct.md) - The Helm chart testing tool
|
||||
|
||||
###### Auto generated by spf13/cobra on 21-Mar-2019
|
||||
###### Auto generated by spf13/cobra on 21-Apr-2020
|
||||
|
||||
@@ -20,4 +20,4 @@ ct version [flags]
|
||||
|
||||
* [ct](ct.md) - The Helm chart testing tool
|
||||
|
||||
###### Auto generated by spf13/cobra on 21-Mar-2019
|
||||
###### Auto generated by spf13/cobra on 21-Apr-2020
|
||||
|
||||
@@ -652,7 +652,7 @@ func (t *Testing) computeMergeBase() (string, error) {
|
||||
if err != nil {
|
||||
return "", errors.New("Must be in a git repository")
|
||||
}
|
||||
return t.git.MergeBase(fmt.Sprintf("%s/%s", t.config.Remote, t.config.TargetBranch), "HEAD")
|
||||
return t.git.MergeBase(fmt.Sprintf("%s/%s", t.config.Remote, t.config.TargetBranch), t.config.Since)
|
||||
}
|
||||
|
||||
// ComputeChangedChartDirectories takes the merge base of HEAD and the configured remote and target branch and computes a
|
||||
|
||||
@@ -41,6 +41,7 @@ var (
|
||||
type Configuration struct {
|
||||
Remote string `mapstructure:"remote"`
|
||||
TargetBranch string `mapstructure:"target-branch"`
|
||||
Since string `mapstructure:"since"`
|
||||
BuildId string `mapstructure:"build-id"`
|
||||
LintConf string `mapstructure:"lint-conf"`
|
||||
ChartYamlSchema string `mapstructure:"chart-yaml-schema"`
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"remote": "origin",
|
||||
"target-branch": "master",
|
||||
"since": "HEAD~1",
|
||||
"build-id": "pr-42",
|
||||
"lint-conf": "my-lint-conf.yaml",
|
||||
"chart-yaml-schema": "my-chart-yaml-schema.yaml",
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
remote: origin
|
||||
target-branch: master
|
||||
since: HEAD~1
|
||||
build-id: pr-42
|
||||
lint-conf: my-lint-conf.yaml
|
||||
chart-yaml-schema: my-chart-yaml-schema.yaml
|
||||
|
||||
Reference in New Issue
Block a user