diff --git a/samples/core/component_build/component_build.ipynb b/samples/core/component_build/component_build.ipynb index d41973449d1..899a3c10b2c 100644 --- a/samples/core/component_build/component_build.ipynb +++ b/samples/core/component_build/component_build.ipynb @@ -67,8 +67,16 @@ "outputs": [], "source": [ "# Set your output and project. !!!Must Do before you can proceed!!!\n", - "EXPERIMENT_NAME = 'basic_component'\n", - "PROJECT_NAME = 'Your-Gcp-Project-Name' #'Your-GCP-Project-ID'\n", + "experiment_name = 'basic_component'\n", + "PROJECT_NAME = 'Your-Gcp-Project-Name' #'Your-GCP-Project-ID'\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ "OUTPUT_DIR = 'gs://%s-basic-component' % PROJECT_NAME # A path for asset outputs\n", "BASE_IMAGE = 'google/cloud-sdk:latest' # Base image used in various steps of the pipeline\n", "TARGET_IMAGE = 'gcr.io/%s/component:latest' % PROJECT_NAME # Target image that will include our final code" @@ -103,9 +111,9 @@ "client = kfp.Client()\n", "\n", "try:\n", - " experiment = client.get_experiment(experiment_name=EXPERIMENT_NAME)\n", + " experiment = client.get_experiment(experiment_name=experiment_name)\n", "except:\n", - " experiment = client.create_experiment(EXPERIMENT_NAME)" + " experiment = client.create_experiment(experiment_name)" ] }, { diff --git a/test/sample-test/configs/component_build.config.yaml b/test/sample-test/configs/component_build.config.yaml new file mode 100644 index 00000000000..b74b08ac6ab --- /dev/null +++ b/test/sample-test/configs/component_build.config.yaml @@ -0,0 +1,18 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +test_name: component_build +notebook_params: + experiment_name: component_build-test + PROJECT_NAME: ml-pipeline-test diff --git a/test/sample_test.yaml b/test/sample_test.yaml index e40659ab5df..6a677401a24 100644 --- a/test/sample_test.yaml +++ b/test/sample_test.yaml @@ -82,6 +82,7 @@ spec: - preemptible_tpu_gpu - volume_snapshot_ops - kubeflow_tf_serving + - component_build # Build and push image - name: build-image-by-dockerfile inputs: