Skip to content

Commit

Permalink
If using boskos, always create a new GCS bucket
Browse files Browse the repository at this point in the history
Previously we were setting KOPS_STATE_STORE before knowing its value, resulting in an empty string
  • Loading branch information
rifelpet committed Apr 24, 2021
1 parent 9afffab commit 50356d2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
6 changes: 0 additions & 6 deletions tests/e2e/kubetest2-kops/deployer/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,6 @@ func (d *deployer) verifyBuildFlags() error {

d.BuildOptions.KopsRoot = d.KopsRoot
d.BuildOptions.StageLocation = d.StageLocation
for _, envvar := range d.env() {
// Set all of the env vars we use for kops in the current process
// so that the tester inherits them when shelling out to kops
i := strings.Index(envvar, "=")
os.Setenv(envvar[0:i], envvar[i+1:])
}
return nil
}

Expand Down
10 changes: 9 additions & 1 deletion tests/e2e/kubetest2-kops/deployer/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func (d *deployer) initialize() error {
d.SSHPrivateKeyPath = privateKey
d.SSHPublicKeyPath = publicKey
}
d.createBucket = os.Getenv("KOPS_STATE_STORE") == ""
d.createBucket = true
}
}
if d.SSHUser == "" {
Expand All @@ -119,6 +119,14 @@ func (d *deployer) initialize() error {
}
d.terraform = t
}
if d.commonOptions.ShouldTest() {
for _, envvar := range d.env() {
// Set all of the env vars we use for kops in the current process
// so that the tester inherits them when shelling out to kops
i := strings.Index(envvar, "=")
os.Setenv(envvar[0:i], envvar[i+1:])
}
}
return nil
}

Expand Down

0 comments on commit 50356d2

Please sign in to comment.