This repository was 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
Taskwith the following steps.Volumefor theConfigMapcontaining the user's index.js and package.json at/fn-sourceVolumethat is anemptyDirat/home/node/usr/fn-source/index.jsand/fn-source/package.jsonto/home/node/usrVolumeat/home/node/usremptyDirVolumeat/home/node/build/home/node/build/home/node/usr,/home/node/buildand anotheremptyDirVolumeat/var/lib/containers/var/lib/containersand use buildah to push the image to the internal repository.The operator, meanwhile, creates a knative
Servicewhich 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/usrdirectory during theassemblephase 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 theServiceis the sameshaas 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
TaskRunis created as expected, but does not succeed, generating this error:Fixes: #10