9"""Create the cockroachDB asset."""
18FILE_DIR = os.path.dirname(os.path.abspath(__file__))
19INFRA_BOTS_DIR = os.path.realpath(os.path.join(FILE_DIR, os.pardir, os.pardir))
20sys.path.insert(0, INFRA_BOTS_DIR)
24URL =
"https://binaries.cockroachdb.com/cockroach-v20.2.8.linux-amd64.tgz"
27 """Create the asset."""
29 p1 = subprocess.Popen([
"curl", URL], stdout=subprocess.PIPE)
30 p2 = subprocess.Popen([
"tar",
"-xzf" "-"], stdin=p1.stdout)
32 _,_ = p2.communicate()
33 shutil.move(
'./cockroach-v20.2.8.linux-amd64/cockroach', target_dir)
37 parser = argparse.ArgumentParser()
38 parser.add_argument(
'--target_dir',
'-t', required=
True)
39 args = parser.parse_args()
43if __name__ ==
'__main__':
def create_asset(chrome_src_path, browser_executable, target_dir, upload_to_partner_bucket, dm_path)