Skip to content

Commit

Permalink
Change bootstrap.py to fix the periodic test.
Browse files Browse the repository at this point in the history
* For periodic test REPO_OWNER and REPO_NAME won't be set so we
  need to hard code the value.
  • Loading branch information
jlewi committed Oct 18, 2017
1 parent b21bc3a commit 470b0d6
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions test-infra/image/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ def clone_repo():
"""
go_path = os.getenv("GOPATH")
# REPO_OWNER and REPO_NAME are the environment variables set by Prow.
repo_owner = os.getenv("REPO_OWNER")
repo_name = os.getenv("REPO_NAME")
repo_owner = os.getenv("REPO_OWNER", GO_REPO_OWNER)
repo_name = os.getenv("REPO_NAME", GO_REPO_NAME)

if bool(repo_owner) != bool(repo_name):
raise ValueError("Either set both environment variables "
Expand All @@ -57,14 +57,6 @@ def clone_repo():
src_dir = os.path.join(go_path, "src/github.com", GO_REPO_OWNER)
dest = os.path.join(src_dir, GO_REPO_NAME)

if not repo_owner and not repo_name:
logging.info("Environment variables REPO_OWNER and REPO_NAME not set; "
"not checking out code.")
if not os.path.exists(dest):
raise ValueError("No code found at %s", dest)
# TODO(jlewi): We should get the sha number and add "-dirty" if needed
return dest, ""

# Clone mlkube
repo = "https://github.com/{0}/{1}.git".format(repo_owner, repo_name)
logging.info("repo %s", repo)
Expand Down

0 comments on commit 470b0d6

Please sign in to comment.