mirror of https://github.com/kubeflow/examples.git
xgboost test for v1 (#718)
* add param for cluster pattern * add new entry to prow-config * add info to error * fix prow-config * match prefix instead of exact test target name matching * update prow-config * remove master suffix for 63 char limit * fix lint
This commit is contained in:
parent
941686e4be
commit
188ba8f091
|
|
@ -65,6 +65,20 @@ workflows:
|
|||
- xgboost_synthetic/*
|
||||
- py/kubeflow/examples/create_e2e_workflow.py
|
||||
|
||||
# E2E test for various notebooks
|
||||
# New notebooks can just add a step to the workflow
|
||||
- py_func: kubeflow.examples.create_e2e_workflow.create_workflow
|
||||
name: notebooks-v1
|
||||
job_types:
|
||||
- periodic
|
||||
- presubmit
|
||||
- postsubmit
|
||||
include_dirs:
|
||||
- xgboost_synthetic/*
|
||||
- py/kubeflow/examples/create_e2e_workflow.py
|
||||
kwargs:
|
||||
cluster_pattern: kf-v1-(?!n\d\d)
|
||||
|
||||
# E2E test for mnist example
|
||||
- py_func: kubeflow.examples.create_e2e_workflow.create_workflow
|
||||
name: mnist
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ PROW_DICT = argo_build_util.get_prow_dict()
|
|||
|
||||
class Builder:
|
||||
def __init__(self, name=None, namespace=None, test_target_name=None,
|
||||
bucket=None,
|
||||
bucket=None, cluster_pattern=None,
|
||||
**kwargs): # pylint: disable=unused-argument
|
||||
"""Initialize a builder.
|
||||
|
||||
|
|
@ -116,6 +116,7 @@ class Builder:
|
|||
|
||||
self.bucket = bucket
|
||||
self.workflow = None
|
||||
self.cluster_pattern = cluster_pattern
|
||||
|
||||
def _build_workflow(self):
|
||||
"""Create the scaffolding for the Argo workflow"""
|
||||
|
|
@ -406,12 +407,21 @@ class Builder:
|
|||
credentials = argo_build_util.deep_copy(task_template)
|
||||
|
||||
credentials["name"] = "get-credentials"
|
||||
credentials["container"]["command"] = ["python3",
|
||||
"-m",
|
||||
"kubeflow.testing."
|
||||
"get_kf_testing_cluster",
|
||||
"get-credentials",
|
||||
]
|
||||
if self.cluster_pattern:
|
||||
credentials["container"]["command"] = ["python3",
|
||||
"-m",
|
||||
"kubeflow.testing."
|
||||
"get_kf_testing_cluster",
|
||||
"--base=" + self.cluster_pattern,
|
||||
"get-credentials",
|
||||
]
|
||||
else:
|
||||
credentials["container"]["command"] = ["python3",
|
||||
"-m",
|
||||
"kubeflow.testing."
|
||||
"get_kf_testing_cluster",
|
||||
"get-credentials",
|
||||
]
|
||||
|
||||
dependencies = [checkout["name"]]
|
||||
argo_build_util.add_task_to_dag(self.workflow, E2E_DAG_NAME, credentials,
|
||||
|
|
@ -419,12 +429,12 @@ class Builder:
|
|||
|
||||
#**************************************************************************
|
||||
# Run a dag of tests
|
||||
if self.test_target_name == "notebooks":
|
||||
if self.test_target_name.startswith("notebooks"):
|
||||
self._build_tests_dag_notebooks()
|
||||
elif self.test_target_name == "mnist":
|
||||
self._build_tests_dag_mnist()
|
||||
else:
|
||||
raise RuntimeError('Invalid test_target_name')
|
||||
raise RuntimeError('Invalid test_target_name ' + self.test_target_name)
|
||||
|
||||
# Add a task to run the dag
|
||||
dependencies = [credentials["name"]]
|
||||
|
|
|
|||
Loading…
Reference in New Issue