Skip to content

Commit

Permalink
Merge pull request #10613 from rifelpet/kubetest-upgrade
Browse files Browse the repository at this point in the history
Use kops binary built by kubetest2-kops in upgrade script
  • Loading branch information
k8s-ci-robot committed Jan 20, 2021
2 parents b134967 + 90a15a7 commit e0a04b4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 8 additions & 0 deletions tests/e2e/kubetest2-kops/deployer/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,14 @@ func (d *deployer) initialize() error {
d.KopsBinaryPath = binaryPath
d.KopsBaseURL = baseURL
}
// These environment variables are defined by the "preset-aws-ssh" prow preset
// https://github.com/kubernetes/test-infra/blob/3d3b325c98b739b526ba5d93ce21c90a05e1f46d/config/prow/config.yaml#L653-L670
if d.SSHPrivateKeyPath == "" {
d.SSHPrivateKeyPath = os.Getenv("AWS_SSH_PRIVATE_KEY_FILE")
}
if d.SSHPublicKeyPath == "" {
d.SSHPublicKeyPath = os.Getenv("AWS_SSH_PUBLIC_KEY_FILE")
}
return nil
}

Expand Down
9 changes: 0 additions & 9 deletions tests/e2e/kubetest2-kops/deployer/up.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ package deployer
import (
"errors"
"fmt"
"os"
osexec "os/exec"
"strings"

Expand Down Expand Up @@ -163,14 +162,6 @@ func (d *deployer) IsUp() (bool, error) {

// verifyUpFlags ensures fields are set for creation of the cluster
func (d *deployer) verifyUpFlags() error {
// These environment variables are defined by the "preset-aws-ssh" prow preset
// https://github.com/kubernetes/test-infra/blob/3d3b325c98b739b526ba5d93ce21c90a05e1f46d/config/prow/config.yaml#L653-L670
if d.SSHPrivateKeyPath == "" {
d.SSHPrivateKeyPath = os.Getenv("AWS_SSH_PRIVATE_KEY_FILE")
}
if d.SSHPublicKeyPath == "" {
d.SSHPublicKeyPath = os.Getenv("AWS_SSH_PUBLIC_KEY_FILE")
}
if d.KubernetesVersion == "" {
return errors.New("missing required --kubernetes-version flag")
}
Expand Down
1 change: 1 addition & 0 deletions tests/e2e/scenarios/upgrade/run-test
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ set -o pipefail
echo "CLOUD_PROVIDER=${CLOUD_PROVIDER}"

REPO_ROOT=$(git rev-parse --show-toplevel);
PATH=$REPO_ROOT/bazel-bin/cmd/kops/$(go env GOOS)-$(go env GOARCH)/kops:$PATH

KUBETEST2_COMMON_ARGS="-v=2 --cloud-provider=${CLOUD_PROVIDER} --cluster-name=${CLUSTER_NAME:-} --kops-binary-path=${REPO_ROOT}/bazel-bin/cmd/kops/linux-amd64/kops"
KUBETEST2_COMMON_ARGS="${KUBETEST2_COMMON_ARGS} --admin-access=${ADMIN_ACCESS:-}"
Expand Down

0 comments on commit e0a04b4

Please sign in to comment.