in cicd-deployers/dataform_runner.py [0:0]
def run_workflow(gcp_project: str, project_num: str, location: str, repo_name: str, tags: list, execute: str,
branch: str):
"""Orchestrates the complete Dataform workflow process: compilation and execution.
Args:
gcp_project (str): The GCP project ID.
project_num (str): The GCP project Number.
location (str): The GCP region.
repo_name (str): The name of the Dataform repository.
tag (str): The target tags to compile and execute.
branch (str): The Git branch to use.
"""
repo_uri = f'projects/{gcp_project}/locations/{location}/repositories/{repo_name}'
compilation_result = compile_workflow(repo_uri, branch)
if execute:
workflow_invocation_name = execute_workflow(repo_uri, compilation_result, tags)
get_workflow_status(workflow_invocation_name)
print(json.dumps({}, indent=2))