Beispiel #1
0
    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.")
Beispiel #2
0
    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."
        )
Beispiel #3
0
    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.")
Beispiel #4
0
                        'git', 'rebase', 'upstream_with_token/master', 'master'
                    ],
                                          cwd=feedstock_dir)
                except subprocess.CalledProcessError:
                    # Handle rebase failure by choosing the changes in `master`.
                    subprocess.check_call(
                        ['git', 'checkout', 'master', '--', '.'],
                        cwd=feedstock_dir)
                    subprocess.check_call(['git', 'rebase', '--continue'],
                                          cwd=feedstock_dir)

            # Remove this recipe from the repo.
            if is_merged_pr:
                subprocess.check_call(['git', 'rm', '-rf', recipe_dir])
                from conda_smithy.ci_register import travis_cleanup
                travis_cleanup("conda-forge", name + "-feedstock")

    # Update status based on the remote.
    subprocess.check_call(
        ['git', 'stash', '--keep-index', '--include-untracked'])
    subprocess.check_call(['git', 'fetch'])
    # CBURR: Debugging
    subprocess.check_call(['git', 'status'])
    subprocess.check_call(['git', 'rebase', '--autostash'])
    subprocess.check_call(['git', 'add', '.'])
    try:
        subprocess.check_call(['git', 'stash', 'pop'])
    except subprocess.CalledProcessError:
        # In case there was nothing to stash.
        # Finish quietly.
        pass