forked from kubeflow/testing
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create a python script to autogenerate PipelineRun's for all kubeflow…
… applications * Define a config file to list i) Relevant information about each application to build e.g the location of its source, the location of its kustomize manifest ii) The versions (i.e. branches) of the various repositories to build from * Create a python script that takes the cross product of applications and versions and creates a tekton PipelineRun to build the docker image and update the manifest. * Fix a bug in update_manifests with image_name not being set. Related to kubeflow#450: Continuous delivery of Kubeflow applications Here are some autogenerated PRs updating the manifests * kubeflow/manifests#697 * kubeflow/manifests#696 * Fix email of kubeflow bot to pass CLA check. * Fix kubeflow#557
- Loading branch information
Jeremy Lewi
committed
Jan 8, 2020
1 parent
768a4d0
commit 48e6201
Showing
9 changed files
with
628 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
# This file contains the configuration for the Tekton pipelines | ||
# To auto update Kubeflow applications | ||
# | ||
# Applications provides information about each application to build | ||
# Note: Keep applications organized alphabetically by name. | ||
applications: | ||
- name: admission-webhook | ||
params: | ||
- name: "path_to_context" | ||
value: "components/admission-webhook" | ||
- name: "path_to_docker_file" | ||
value: "components/admission-webhook/Dockerfile" | ||
- name: "path_to_manifests_dir" | ||
value: "admission-webhook/webhook/base" | ||
- name: "src_image_url" | ||
value: "gcr.io/kubeflow-images-public/admission-webhook" | ||
sourceRepo: kubeflow | ||
- name: centraldashboard | ||
params: | ||
- name: "path_to_context" | ||
value: "components/centraldashboard" | ||
- name: "path_to_docker_file" | ||
value: "components/centraldashboard/Dockerfile" | ||
- name: "path_to_manifests_dir" | ||
value: "common/centraldashboard/base" | ||
- name: "src_image_url" | ||
value: "gcr.io/kubeflow-images-public/centraldashboard" | ||
sourceRepo: kubeflow | ||
- name: kfam | ||
params: | ||
- name: "path_to_context" | ||
value: "components/access-management" | ||
- name: "path_to_docker_file" | ||
value: "components/acess-management/Dockerfile" | ||
- name: "path_to_manifests_dir" | ||
value: "profiles/base" | ||
- name: "src_image_url" | ||
value: "gcr.io/kubeflow-images-public/kfam" | ||
sourceRepo: kubeflow | ||
- name: notebook-controller | ||
params: | ||
- name: "path_to_context" | ||
value: "components/notebook-controller" | ||
- name: "path_to_docker_file" | ||
value: "components/notebook-controller/Dockerfile" | ||
- name: "path_to_manifests_dir" | ||
value: "jupyter/notebook-controller" | ||
- name: "src_image_url" | ||
value: "gcr.io/kubeflow-images-public/notebook-controller" | ||
# The name of the repo containing the source | ||
sourceRepo: kubeflow | ||
- name: notebook-webapp | ||
params: | ||
- name: "path_to_context" | ||
value: "components/jupyter-web-app" | ||
- name: "path_to_docker_file" | ||
value: "components/jupyter-web-app/Dockerfile" | ||
- name: "path_to_manifests_dir" | ||
value: "jupyter/jupyter-web-app/base" | ||
- name: "src_image_url" | ||
value: "gcr.io/kubeflow-images-public/jupyter-web-app" | ||
# The name of the repo containing the source | ||
sourceRepo: kubeflow | ||
- name: profile-controller | ||
params: | ||
- name: "path_to_context" | ||
value: "components/profile-controller" | ||
- name: "path_to_docker_file" | ||
value: "components/profile-controller/Dockerfile" | ||
- name: "path_to_manifests_dir" | ||
value: "profiles/base" | ||
- name: "src_image_url" | ||
value: "gcr.io/kubeflow-images-public/profile-controller" | ||
# The name of the repo containing the source | ||
sourceRepo: kubeflow | ||
# The versions to build the applications at | ||
# Each version should consist of a list of repositories and the corresponding | ||
# branch and a tag | ||
versions: | ||
# master should be the latest code built from all of the master branches | ||
- name: master | ||
# A tag to prefix image names with | ||
tag: vmaster | ||
repos: | ||
- name: kubeflow | ||
resourceSpec: | ||
type: git | ||
params: | ||
- name: revision | ||
value: master | ||
- name: url | ||
value: git@github.com:kubeflow/kubeflow.git | ||
- name: manifests | ||
resourceSpec: | ||
type: git | ||
params: | ||
- name: revision | ||
value: master | ||
- name: url | ||
value: git@github.com:kubeflow/manifests.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# This is a template used for generating PipelineRuns for | ||
# individual applications at specific commits. | ||
apiVersion: tekton.dev/v1alpha1 | ||
kind: PipelineRun | ||
metadata: | ||
# Generate a unique name for each run | ||
generateName: ci-profile-controller- | ||
spec: | ||
pipelineRef: | ||
name: ci-pipeline | ||
params: | ||
- name: "path_to_context" | ||
value: "components/profile-controller" | ||
- name: "path_to_docker_file" | ||
value: "components/profile-controller/Dockerfile" | ||
- name: "path_to_manifests_dir" | ||
value: "profiles/base" | ||
- name: "src_image_url" | ||
value: "gcr.io/kubeflow-images-public/profile-controller" | ||
- name: "container_image" | ||
value: "gcr.io/kubeflow-releasing/test-worker@sha256:35138a42b57160a078e802b7d69aec3c3e79a3e2e55518af7798275ebcc84d25" | ||
resources: | ||
# The git resources that will be used | ||
- name: kubeflow | ||
resourceSpec: | ||
type: git | ||
params: | ||
- name: revision | ||
value: "1795828" | ||
- name: url | ||
value: git@github.com:kubeflow/kubeflow.git | ||
- name: manifests | ||
resourceSpec: | ||
type: git | ||
params: | ||
- name: revision | ||
value: master | ||
- name: url | ||
value: git@github.com:kubeflow/manifests.git | ||
- name: ci-tools | ||
resourceSpec: | ||
type: git | ||
params: | ||
# TODO(jlewi): Replace with kubeflw/testing master once the PR is merged | ||
# | ||
- name: revision | ||
value: cicd | ||
- name: url | ||
value: git@github.com:jlewi/testing.git | ||
#- name: revision | ||
# value: master | ||
#- name: url | ||
# value: git@github.com:kubeflow/testing.git | ||
# The image we want to build | ||
- name: image | ||
resourceSpec: | ||
type: image | ||
params: | ||
- name: url | ||
value: gcr.io/kubeflow-images-public/profile-controller:vmaster-g1795828 | ||
serviceAccountName: ci-pipeline-run-service-account |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
54 changes: 54 additions & 0 deletions
54
py/kubeflow/testing/cd/test_data/notebook_controller.expected.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
apiVersion: tekton.dev/v1alpha1 | ||
kind: PipelineRun | ||
metadata: | ||
# Generate a unique name for each run | ||
generateName: cd-notebook-controller-1234abcd | ||
spec: | ||
pipelineRef: | ||
name: ci-pipeline | ||
params: | ||
- name: "path_to_context" | ||
value: "components/notebook-controller" | ||
- name: "path_to_docker_file" | ||
value: "components/notebook-controller/Dockerfile" | ||
- name: "path_to_manifests_dir" | ||
value: "jupyter/notebook-controller" | ||
- name: "src_image_url" | ||
value: "gcr.io/kubeflow-images-public/notebook-controller" | ||
- name: "container_image" | ||
value: "gcr.io/kubeflow-releasing/test-worker@sha256:35138a42b57160a078e802b7d69aec3c3e79a3e2e55518af7798275ebcc84d25" | ||
resources: | ||
# The git resources that will be used | ||
- name: kubeflow | ||
resourceSpec: | ||
type: git | ||
params: | ||
- name: revision | ||
value: "1234abcd" | ||
- name: url | ||
value: git@github.com:kubeflow/kubeflow.git | ||
- name: manifests | ||
resourceSpec: | ||
type: git | ||
params: | ||
- name: revision | ||
value: master | ||
- name: url | ||
value: git@github.com:kubeflow/manifests.git | ||
# TODO(jlewi): Replace with kubeflw/kubeflow once the PR is checked in. | ||
- name: ci-tools | ||
resourceSpec: | ||
type: git | ||
params: | ||
- name: revision | ||
value: tekton | ||
- name: url | ||
value: git@github.com:jlewi/testing.git | ||
# The image we want to build | ||
- name: image | ||
resourceSpec: | ||
type: image | ||
params: | ||
- name: url | ||
value: gcr.io/kubeflow-images-public/notebook-controller:vmaster-g1234abcd | ||
serviceAccountName: ci-pipeline-run-service-account |
Oops, something went wrong.