tasks/libs/pipeline_tools.py
def wait_for_pipeline(gitlab, pipeline_id, pipeline_finish_timeout_sec=PIPELINE_FINISH_TIMEOUT_SEC):
    """
    Follow a given pipeline, periodically checking the pipeline status
    and printing changes to the job statuses.
    """
    commit_author, commit_short_sha, commit_title = get_commit_for_pipeline(gitlab, pipeline_id)

    print(
        color_message(
            "Commit: "
            + color_message(commit_title, "green")
            + color_message(f" ({commit_short_sha})", "grey")
            + " by "
            + color_message(commit_author, "bold"),
            "blue",
        )
    )
    print(
        color_message(
            "Pipeline Link: "
            + color_message(f"https://gitlab.ddbuild.io/{gitlab.project_name}/pipelines/{pipeline_id}", "green"),
            "blue",
        )
    )

    print(color_message("Waiting for pipeline to finish. Exiting won't cancel it.", "blue"))

    f = functools.partial(pipeline_status, gitlab, pipeline_id)

    loop_status(f, pipeline_finish_timeout_sec)

    return pipeline_id

    Follow a given pipeline, periodically checking the pipeline status
    and printing changes to the job statuses.
    
Follow a given pipeline, periodically checking the pipeline status
and printing changes to the job statuses.
Follow a given pipeline periodically checking the pipeline status and printing changes to the job statuses .
def wait_for_pipeline(gitlab, pipeline_id, pipeline_finish_timeout_sec=PIPELINE_FINISH_TIMEOUT_SEC):
    commit_author, commit_short_sha, commit_title = get_commit_for_pipeline(gitlab, pipeline_id)
    print(
        color_message(
            "Commit: "
            + color_message(commit_title, "green")
            + color_message(f" ({commit_short_sha})", "grey")
            + " by "
            + color_message(commit_author, "bold"),
            "blue",
        )
    )
    print(
        color_message(
            "Pipeline Link: "
            + color_message(f"https://gitlab.ddbuild.io/{gitlab.project_name}/pipelines/{pipeline_id}", "green"),
            "blue",
        )
    )
    print(color_message("Waiting for pipeline to finish. Exiting won't cancel it.", "blue"))
    f = functools.partial(pipeline_status, gitlab, pipeline_id)
    loop_status(f, pipeline_finish_timeout_sec)
    return pipeline_id
def wait_for_pipeline ( gitlab , pipeline_id , pipeline_finish_timeout_sec = PIPELINE_FINISH_TIMEOUT_SEC ) : commit_author , commit_short_sha , commit_title = get_commit_for_pipeline ( gitlab , pipeline_id ) print ( color_message ( "Commit: " + color_message ( commit_title , "green" ) + color_message ( f" ({commit_short_sha})" , "grey" ) + " by " + color_message ( commit_author , "bold" ) , "blue" , ) ) print ( color_message ( "Pipeline Link: " + color_message ( f"https://gitlab.ddbuild.io/{gitlab.project_name}/pipelines/{pipeline_id}" , "green" ) , "blue" , ) ) print ( color_message ( "Waiting for pipeline to finish. Exiting won't cancel it." , "blue" ) ) f = functools . partial ( pipeline_status , gitlab , pipeline_id ) loop_status ( f , pipeline_finish_timeout_sec ) return pipeline_id
Follow a given pipeline, periodically checking the pipeline status
and printing changes to the job statuses.
Follow a given pipeline periodically checking the pipeline status and printing changes to the job statuses .
"""
    Follow a given pipeline, periodically checking the pipeline status
    and printing changes to the job statuses.
    """
gitlab
pipeline_id
pipeline_finish_timeout_sec