Skip to content
This repository has been archived by the owner on Jun 7, 2021. It is now read-only.

feat: use tekton Pipeline and add JSFunctionBuild #20

Merged
merged 7 commits into from
Sep 4, 2019
Merged

Conversation

lance
Copy link
Member

@lance lance commented Sep 3, 2019

This change adds a new CRD - JSFunctionBuild whose responsibility is to
run a Tekton Pipeline when it is provided with a new revision of the
JSFunction container image URL. The controller manages a Tekton
PipelineResource for each function. When the function changes and a new
image/tag is needed, the controller updates the PipelineResource with the
new image tag, and then initiates a build.

This pull request supercedes #16

Fixes #13

Fixes: #13

Extract all of the build code into a separate file, and adjust the logic
in the controller so that the ConfigMap is updated and a new TaskRun is
created when the function source changes.
This also means that the kn service will be updated with the new
image tag when a function changes and is rebuilt, allowing for auto
deployment of modified functions.
This change adds a new CRD - `JSFunctionBuild` whose responsibility
is to run a Tekton `Pipeline` when it is provided with a new revision
of the `JSFunction` container image URL. The controller manages a
Tekton `PipelineResource` for each function. When the function changes
and a new image/tag is needed, the controller updates the `PipelineResource`
with the new image tag, and then initiates a build.
Copy link
Contributor

@slinkydeveloper slinkydeveloper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@lance lance added the enhancement New feature or request label Sep 4, 2019
Copy link
Contributor

@zroubalik zroubalik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, there are just a very minor comments from my side.

deploy/build/pipeline-run.yaml Outdated Show resolved Hide resolved
deploy/crds/faas_v1alpha1_jsfunctionbuild_cr.yaml Outdated Show resolved Hide resolved
@lance lance merged commit 40e4ef6 into master Sep 4, 2019
@lance lance deleted the add-pipeline branch September 4, 2019 19:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The runtime image should be rebuilt when the function source changes
3 participants