Developers Guide for Runtime itself

How to Build and run tests

You need a Linux or an OSX environment, with Java and Docker installed to build the sources.

Prerequisites for running build and tests with gradle:

  • docker
  • jdk

To compile go proxy in amd64 architecture for docker:

./gradlew build

To build the docker images, after compiling go proxy:

./gradlew distDocker

This will build the images:

  • action-golang-v1.13: an image supporting Go 1.13 sources (does expect an ack)
  • action-golang-v1.14: an image supporting Go 1.14 sources (does expect an ack)
  • action-golang-v1.15: an image supporting Go 1.15 sources (does expect an ack)
  • actionloop-base: the base image, supporting generic executables ans shell script (does not expect an ack)

The actionloop-base image can be used for supporting other compiled programming languages as long as they implement a compile script and the action loop protocol described below. Please check this documens for configuration options

To run tests:

./gradlew test --info

Local Development

If you want to develop the proxy and run tests natively, you can do it on Linux or OSX. Development has been tested on Ubuntu Linux (14.04) and OSX 10.13. Probably other distributions work, maybe even Windows with WSL, but since it is not tested YMMMV.

You need to install, of course go 1.14.x

Then you need a set of utilities used in tests:

  • bc
  • zip

Linux: apt-get install bc zip OSX: brew install zip

NOTE: Because tests build and cache some binary files, perform a git clean -fx and do not share folders between linux and osx because binaries are in different format...

You can also run the tests in go, without using gradle with

cd openwhisk
go test