Skip to content
Snippets Groups Projects
Commit 6cb967e4 authored by Chetan Mehrotra's avatar Chetan Mehrotra Committed by Carlos Santana
Browse files

Switch to Maven based dependency (#7)

parent 0ce7a872
No related branches found
No related tags found
No related merge requests found
......@@ -65,7 +65,35 @@ wsk action update myAction myAction.py --docker $user_prefix/python3action
The `$user_prefix` is usually your dockerhub user id.
Replace `python3action` with `python2action` to use python 2
### Testing
Install dependencies from the root directory on $OPENWHISK_HOME repository
```
./gradlew install
```
Using gradle for the ActionContainer tests you need to use a proxy if running on Mac, if Linux then don't use proxy options
You can pass the flags `-Dhttp.proxyHost=localhost -Dhttp.proxyPort=3128` directly in gradle command.
Or save in your `$HOME/.gradle/gradle.properties`
```
systemProp.http.proxyHost=localhost
systemProp.http.proxyPort=3128
```
Using gradle to run all tests
```
./gradlew :tests:test
```
Using gradle to run some tests
```
./gradlew :tests:test --tests *ActionContainerTests*
```
Using IntelliJ:
- Import project as gradle project.
- Make sure working directory is root of the project/repo
- Add the following Java VM properties in ScalaTests Run Configuration, easiest is to change the Defaults for all ScalaTests to use this VM properties
```
-Dhttp.proxyHost=localhost
-Dhttp.proxyPort=3128
```
# License
[Apache 2.0](LICENSE.txt)
......
whisk_version_name: local
config_root_dir: /tmp/wskconf
whisk_logs_dir: /tmp/wsklogs
openwhisk_tmp_dir: "{{ lookup('env', 'OPENWHISK_TMP_DIR')|default('/tmp', true) }}"
config_root_dir: "{{ openwhisk_tmp_dir }}/wskconf"
whisk_logs_dir: "{{ openwhisk_tmp_dir }}/wsklogs"
docker_registry: ""
docker_dns: ""
bypass_pull_for_local_images: true
......
def owPath = System.getenv("OPENWHISK_HOME") ?: '../open'
def owDirectory = new File(owPath)
include 'common:scala'; project(':common:scala').projectDir = new File(owDirectory, 'common/scala')
include 'core:controller'; project(':core:controller').projectDir = new File(owDirectory, 'core/controller')
include 'core:invoker'; project(':core:invoker').projectDir = new File(owDirectory, 'core/invoker')
include 'whisktests'; project(':whisktests').projectDir = new File(owDirectory, 'tests')
include 'tests'
include 'core:pythonAction'
......@@ -13,6 +5,10 @@ include 'core:python2Action'
rootProject.name = 'runtime-python'
gradle.ext.openwhisk = [
version: '1.0.0-SNAPSHOT'
]
gradle.ext.scala = [
version: '2.11.8',
compileFlags: ['-feature', '-unchecked', '-deprecation', '-Xfatal-warnings', '-Ywarn-unused-import']
......
......@@ -2,10 +2,9 @@ apply plugin: 'scala'
apply plugin: 'eclipse'
compileTestScala.options.encoding = 'UTF-8'
evaluationDependsOn(':whisktests')
repositories {
mavenCentral()
mavenLocal()
}
tasks.withType(Test) {
......@@ -19,8 +18,8 @@ tasks.withType(Test) {
dependencies {
compile "org.scala-lang:scala-library:${gradle.scala.version}"
compile project(':whisktests')
compile project(':whisktests').sourceSets.test.output
compile "org.apache.openwhisk:openwhisk-tests:${gradle.openwhisk.version}:tests"
compile "org.apache.openwhisk:openwhisk-tests:${gradle.openwhisk.version}:test-sources"
}
tasks.withType(ScalaCompile) {
......
......@@ -11,13 +11,6 @@ export OPENWHISK_HOME=$WHISKDIR
IMAGE_PREFIX="testing"
# Build runtime
cd $ROOTDIR
TERM=dumb ./gradlew \
:core:python2Action:distDocker :core:pythonAction:distDocker \
-PdockerImagePrefix=${IMAGE_PREFIX}
# Build OpenWhisk
cd $WHISKDIR
......@@ -29,6 +22,14 @@ docker tag openwhisk/invoker ${IMAGE_PREFIX}/invoker
docker pull openwhisk/nodejs6action
docker tag openwhisk/nodejs6action ${IMAGE_PREFIX}/nodejs6action
TERM=dumb ./gradlew \
:common:scala:install \
:core:controller:install \
:core:invoker:install \
:tests:install
# Build runtime
cd $ROOTDIR
TERM=dumb ./gradlew \
:core:python2Action:distDocker :core:pythonAction:distDocker \
-PdockerImagePrefix=${IMAGE_PREFIX}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment