def __call__(self, args): from conda_smithy import ci_register owner = args.user or args.organization repo = os.path.basename(os.path.abspath(args.feedstock_directory)) print("CI Summary for {}/{} (can take ~30s):".format(owner, repo)) if args.travis: ci_register.add_project_to_travis(owner, repo) ci_register.travis_token_update_conda_forge_config( args.feedstock_directory, owner, repo) time.sleep(1) ci_register.travis_configure(owner, repo) ci_register.travis_cleanup(owner, repo) else: print("Travis registration disabled.") if args.circle: ci_register.add_project_to_circle(owner, repo) ci_register.add_token_to_circle(owner, repo) else: print("Circle registration disabled.") if args.azure: if azure_ci_utils.default_config.token is None: print( "No azure token. Create a token at https://dev.azure.com/conda-forge/_usersSettings/tokens and\n" "put it in ~/.conda-smithy/azure.token") ci_register.add_project_to_azure(owner, repo) else: print("Azure registration disabled.") if args.appveyor: ci_register.add_project_to_appveyor(owner, repo) ci_register.appveyor_encrypt_binstar_token( args.feedstock_directory, owner, repo) ci_register.appveyor_configure(owner, repo) else: print("Appveyor registration disabled.") if args.drone: ci_register.add_project_to_drone(owner, repo) ci_register.add_token_to_drone(owner, repo) else: print("Drone registration disabled.") ci_register.add_conda_forge_webservice_hooks(owner, repo) print( "\nCI services have been enabled. You may wish to regenerate the feedstock.\n" "Any changes will need commiting to the repo.")
def __call__(self, args): from conda_smithy import ci_register owner = args.user or args.organization repo = os.path.basename(os.path.abspath(args.feedstock_directory)) print("CI Summary for {}/{} (can take ~30s):".format(owner, repo)) if args.travis: ci_register.add_project_to_travis(owner, repo) ci_register.travis_token_update_conda_forge_config( args.feedstock_directory, owner, repo ) time.sleep(1) ci_register.travis_configure(owner, repo) ci_register.travis_cleanup(owner, repo) else: print("Travis registration disabled.") if args.circle: ci_register.add_project_to_circle(owner, repo) ci_register.add_token_to_circle(owner, repo) else: print("Circle registration disabled.") if args.azure: if azure_ci_utils.default_config.token is None: print( "No azure token. Create a token at https://dev.azure.com/conda-forge/_usersSettings/tokens and\n" "put it in ~/.conda-smithy/azure.token" ) ci_register.add_project_to_azure(owner, repo) else: print("Azure registration disabled.") if args.appveyor: ci_register.add_project_to_appveyor(owner, repo) ci_register.appveyor_encrypt_binstar_token( args.feedstock_directory, owner, repo ) ci_register.appveyor_configure(owner, repo) else: print("Appveyor registration disabled.") ci_register.add_conda_forge_webservice_hooks(owner, repo) print( "\nCI services have been enabled. You may wish to regenerate the feedstock.\n" "Any changes will need commiting to the repo." )
def __call__(self, args): from conda_smithy import ci_register owner = args.user or args.organization repo = os.path.basename(os.path.abspath(args.feedstock_directory)) print('CI Summary for {}/{} (can take ~30s):'.format(owner, repo)) ci_register.add_project_to_travis(owner, repo) ci_register.travis_token_update_conda_forge_config(args.feedstock_directory, owner, repo) time.sleep(1) ci_register.travis_configure(owner, repo) ci_register.travis_cleanup(owner, repo) ci_register.add_project_to_circle(owner, repo) ci_register.add_token_to_circle(owner, repo) ci_register.add_project_to_appveyor(owner, repo) ci_register.appveyor_encrypt_binstar_token(args.feedstock_directory, owner, repo) ci_register.appveyor_configure(owner, repo) ci_register.add_conda_forge_webservice_hooks(owner, repo) print("\nCI services have been enabled. You may wish to regenerate the feedstock.\n" "Any changes will need commiting to the repo.")
recipe_dir) in enumerate(feedstock_dirs): if name.lower() in REPO_SKIP_LIST: continue print("\n\nregistering CI services for %s..." % name) if num >= 10: exit_code = 0 break # Try to register each feedstock with CI. # However sometimes their APIs have issues for whatever reason. # In order to bank our progress, we note the error and handle it. # After going through all the recipes and removing the converted ones, # we fail the build so that people are aware that things did not clear. # hack to help travis work from conda_smithy.ci_register import add_project_to_travis add_project_to_travis("conda-forge", name + "-feedstock") # end of hack try: write_token('anaconda', os.environ['STAGING_BINSTAR_TOKEN']) subprocess.check_call([ 'conda', 'smithy', 'register-ci', '--without-appveyor', '--without-webservice', '--feedstock_directory', feedstock_dir ] + owner_info) subprocess.check_call(['conda', 'smithy', 'rerender'], cwd=feedstock_dir) except subprocess.CalledProcessError: exit_code = 0 traceback.print_exception(*sys.exc_info()) continue