Closed zhy989 closed 7 years ago
You need to set the OPENWHISK_HOME env variable and run gradlew distdocker as gradlew :distdocker
@jasonpet I set the OPENWHISK_HOME env variable in file /etc/profile, but the error is still there:
FAILURE: Build failed with an exception.
Where: Build file '/home/zhy/iot/incubator-openwhisk-package-alarms/tests/build.gradle' line: 28
What went wrong: A problem occurred evaluating project ':tests'.
Could not get unknown property 'sourceSets' for project ':whisktests' of type org.gradle.api.Project.
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 11.0 secs
@jasonpet I download the openwhisk code to /home/zhy/incubator-openwhisk
and add "OPENWHISK_HOME=/home/zhy/incubator-openwhisk" at the end of the file /etc/profile
"source /etc/porfile"
then I run "./gradlew distDocker", the error is the same as before.
@jasonpet I delete the line "compile project(':whisktests').sourceSets.test.output" in the file "incubator-openwhisk-package-alarms/tests/build.gradle" and build the docker image "catalog_alarms " successfully. then I try to run sample helloworld with alarm trigger . After I create the action trigger and rule successfully,then run the cli "wsk -i activation pull", there is no result to output to the screen
wsk -i action list | grep hello /whisk.system/hello private nodejs:6
wsk -i trigger list triggers /whisk.system/every-20-seconds private
wsk -i rule list rules /whisk.system/invoke-periodically private
How do I check the reason for no result to print out to the screen?
I assume you meant activation poll
. Did you use the --feed parameter when creating your 20 second trigger? Did you start the "catalog_alarms" docker container after building it?
Please see https://github.com/apache/incubator-openwhisk-package-alarms/issues/51 if you need help with installing the alarms actions or starting up the alarms container. This issue can be closed. The compilation issue is due to the fact that your OPENWHISK_HOME variable is not set correctly. If you are not trying to run tests then removing the line you mentioned above is fine.
@jasonpet thanks
I run this script to start up the alarms container
WSK_HOME=/openwhisk
DB_PROTOCOL=awk -F "=" '/db_protocol/ {print $2}' $WSK_HOME/ansible/db_local.ini
DB_HOST=awk -F "=" '/db_host/ {print $2}' $WSK_HOME/ansible/db_local.ini
DB_PORT=awk -F "=" '/db_port/ {print $2}' $WSK_HOME/ansible/db_local.ini
DB_USER=awk -F "=" '/db_username/ {print $2}' $WSK_HOME/ansible/db_local.ini
DB_PWD=awk -F "=" '/db_password/ {print $2}' $WSK_HOME/ansible/db_local.ini
DB_PREFIX=test
docker run -d -p 32691:8080 -v $HOME/wsklogs/alarms:/logs \ -e PORT=8080 -e ROUTER_HOST=172.17.0.1 \ -e DB_PREFIX=${DB_PREFIX} -e DB_USERNAME=${DB_USER} \ -e DB_PASSWORD=${DB_PWD} -e DB_HOST=${DB_HOST}:${DB_PORT} \ -e DB_PROTOCOL=${DB_PROTOCOL} whisk/catalog_alarms
@csantanapr - can you please close this?
when I run CLI "./gradlew distDocker", it can not run successfully, the error is as below:
./gradlew distDocker
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead. at docker_7r8ejptnt4f4tnx46yncyk4ag.run(/home/zhy/iot/incubator-openwhisk-package-alarms/gradle/docker.gradle:43)
FAILURE: Build failed with an exception.
Where: Build file '/home/zhy/iot/incubator-openwhisk-package-alarms/tests/build.gradle' line: 28
What went wrong: A problem occurred evaluating project ':tests'.
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 1.51 secs