Exemple #1
0
def push_cnab_bundle(harbor_server, user, password, service_image, invocation_image, target, auto_update_bundle = True):
    docker_api.docker_info_display()
    docker_api.docker_login_cmd(harbor_server, user, password, enable_manifest = False)
    bundle_file = load_bundle(service_image, invocation_image)
    fixed_bundle_file = cnab_fixup_bundle(bundle_file, target, auto_update_bundle = auto_update_bundle)
    sha256 = cnab_push_bundle(fixed_bundle_file, target)
    return sha256
Exemple #2
0
def push_cnab_bundle(harbor_server,
                     user,
                     password,
                     service_image,
                     invocation_image,
                     target,
                     auto_update_bundle=True):
    docker_api.docker_info_display()

    #Add docker login command to avoid pull request access rate elimitation by docker hub
    docker_api.docker_login_cmd("",
                                DOCKER_USER,
                                DOCKER_PWD,
                                enable_manifest=False)

    docker_api.docker_login_cmd(harbor_server,
                                user,
                                password,
                                enable_manifest=False)
    bundle_file = load_bundle(service_image, invocation_image)
    fixed_bundle_file = cnab_fixup_bundle(
        bundle_file, target, auto_update_bundle=auto_update_bundle)
    sha256 = cnab_push_bundle(fixed_bundle_file, target)
    return sha256