We are happy to announce the release of riff v0.2.0. Thank you once again, all riff, Buildpacks, and Knative contributors.
Notable changes in this release include:
- All builds now use Buildpacks
- No more special-case builds of images starting with
riff function create
<invoker>argument before the
- new optional
riff function buildhas been renamed
riff function update
riff service revisehas been renamed
riff service update
riff namespace inithas a new
Here is a map of the buildpack-related repos on Github.
- riff builder creates the
- riff buildpack contributes invokers for running functions
- OpenJDK buildpack contributes OpenJDK JREs and JDKs
- Build System buildpack performs Java based builds
- NodeJS buildpack contributes node.js runtime
- NPM buildpack performs npm based builds
Since buildpacks do detection, we have simplified what used to be:
riff function create <invoker> <name>
The new syntax is:
riff function create <name>
--invoker <invokername> flag allows overrides.
- The presence of a
build.gradlefile will trigger compilation and building of an image for running a Java function.
package.jsonfile or an
--artifactflag pointing to a
--artifactflag pointing to a file with execute permissions will generate an image for running a Command function.
For example, say you have a directory containing just one file,
' ' '\n' | sort | uniq -c | sort -ntr
Make the file executable to use it as a command function.
chmod +x wordcount.sh
riff function create providing the name of the image. E.g. with your DockerHub repo ID.
riff function create wordcount \ --local-path . \ --artifact wordcount.sh \ --image $DOCKER_ID/wordcount:v1
When the function is running:
riff service invoke wordcount --text -- \ -d 'yo yo yo version 0.2.0' \ -w '\w'
1 0.2.0 1 version 3 yo
Try running the following command to invoke your wordcount function on something a little more interesting.
curl -s https://www.constitution.org/usdeclar.txt \ | riff service invoke wordcount --text -- -d @-
Build from GitHub
For in-cluster builds using a GitHub repo, e.g. in a hosted riff environment, replace the
--local-path . with
riff function create wordcount \ --git-repo https://github.com/projectriff-samples/command-wordcount \ --artifact wordcount.sh \ --image $DOCKER_ID/wordcount \ --verbose
No more dev.local
Note that we have removed support for the special
dev.local image name prefix for local builds. All image names need to be prefixed with a registry, and you'll need to configure your riff namespace with credentials to push images to that registry. A new
--no-secret flag has been added to
riff namespace init if your registry does not require authentication.
For more details please see the help for
riff namespace init -h or refer to one of the Getting Started Guides.