in integration/run.py [0:0]
def configure():
"""
Load configuration from CLI args and Taskcluster secrets
"""
parser = argparse.ArgumentParser(description="Run code-review integration tests")
parser.add_argument(
"-c",
"--configuration",
help="Local configuration file replacing Taskcluster secrets",
type=open,
)
parser.add_argument(
"--clone-dir",
help="Directory where to clone repositories",
default=os.environ.get("CLONE_DIR", os.path.join(ROOT, "clone")),
)
parser.add_argument(
"--taskcluster-secret",
help="Taskcluster Secret path",
default=os.environ.get("TASKCLUSTER_SECRET"),
)
args = parser.parse_args()
taskcluster.auth()
taskcluster.load_secrets(
args.taskcluster_secret,
required=("phabricator", "admins"),
existing={"admins": ["babadie@mozilla.com"]},
local_secrets=yaml.safe_load(args.configuration)
if args.configuration
else None,
)
# Make sure the clone dir is available
os.makedirs(args.clone_dir, exist_ok=True)
# Check the url is correctly formatted
assert taskcluster.secrets["phabricator"]["url"].endswith(
"/api/"
), "Phabricator url must end in /api/"
return args