Add a setting for chart repository CA certificates [#74]
This commit is contained in:
@@ -24,6 +24,7 @@ type Config struct {
|
||||
DroneEvent string `envconfig:"DRONE_BUILD_EVENT"` // Drone event that invoked this plugin.
|
||||
UpdateDependencies bool `split_words:"true"` // Call `helm dependency update` before the main command
|
||||
AddRepos []string `split_words:"true"` // Call `helm repo add` before the main command
|
||||
RepoCAFile string `envconfig:"repo_ca_file"` // CA certificate for `helm repo add`
|
||||
Debug bool `` // Generate debug output and pass --debug to all helm commands
|
||||
Values string `` // Argument to pass to --set in applicable helm commands
|
||||
StringValues string `split_words:"true"` // Argument to pass to --set-string in applicable helm commands
|
||||
|
||||
@@ -171,7 +171,8 @@ func addRepos(cfg Config) []Step {
|
||||
steps := make([]Step, 0)
|
||||
for _, repo := range cfg.AddRepos {
|
||||
steps = append(steps, &run.AddRepo{
|
||||
Repo: repo,
|
||||
Repo: repo,
|
||||
CAFile: cfg.RepoCAFile,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -291,6 +291,7 @@ func (suite *PlanTestSuite) TestAddRepos() {
|
||||
"first=https://add.repos/one",
|
||||
"second=https://add.repos/two",
|
||||
},
|
||||
RepoCAFile: "state_licensure.repo.cert",
|
||||
}
|
||||
steps := addRepos(cfg)
|
||||
suite.Require().Equal(2, len(steps), "addRepos should add one step per repo")
|
||||
@@ -301,6 +302,8 @@ func (suite *PlanTestSuite) TestAddRepos() {
|
||||
|
||||
suite.Equal(first.Repo, "first=https://add.repos/one")
|
||||
suite.Equal(second.Repo, "second=https://add.repos/two")
|
||||
suite.Equal(first.CAFile, "state_licensure.repo.cert")
|
||||
suite.Equal(second.CAFile, "state_licensure.repo.cert")
|
||||
}
|
||||
|
||||
func (suite *PlanTestSuite) TestLint() {
|
||||
|
||||
Reference in New Issue
Block a user