This repository has been archived by the owner on Jun 7, 2021. It is now read-only.
feat: add a TaskRun to build a function runtime image #11
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
DO NOT MERGE
Update 22-08-2019
The build is defined as a tekton
Task
with the following steps.Volume
for theConfigMap
containing the user's index.js and package.json at/fn-source
Volume
that is anemptyDir
at/home/node/usr
/fn-source/index.js
and/fn-source/package.json
to/home/node/usr
Volume
at/home/node/usr
emptyDir
Volume
at/home/node/build
/home/node/build
/home/node/usr
,/home/node/build
and anotheremptyDir
Volume
at/var/lib/containers
/var/lib/containers
and use buildah to push the image to the internal repository.The operator, meanwhile, creates a knative
Service
which uses the resulting image pushed to the internal repository in the final build step.All of this mostly works. However there seems to be a problem with the s2i build step wherein dependencies added to the/home/node/usr
directory during theassemble
phase do not appear in the resulting runtime image. At this point, I am a bit stumped. I have shared this with @bbrowning on Slack, and he is also unsure about what might be happening with the image. I have confirmed that the image being run for theService
is the samesha
as the one being generated in the build.This is now working as expected. @openshift-cloud-functions/contributors please have a look.
Original text
This is a work in progress. Currently, when deploying a function the
TaskRun
is created as expected, but does not succeed, generating this error:Fixes: #10