This is an automated email from the ASF dual-hosted git repository.
houshengbo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk.git
The following commit(s) were added to refs/heads/master by this push:
new eab1ba5 Add the test to verify the scenario when one invoker is
stopped (#4396)
eab1ba5 is described below
commit eab1ba587c2faaf46530b2dd9948c0cd1959a213
Author: Vincent <[email protected]>
AuthorDate: Tue Mar 26 23:06:43 2019 -0400
Add the test to verify the scenario when one invoker is stopped (#4396)
---
Jenkinsfile | 35 +++++++++++++++++++---
.../jenkins/group_vars/openwhisk-vm1-he-de | 2 ++
.../jenkins/group_vars/openwhisk-vm2-he-de | 2 ++
.../jenkins/group_vars/openwhisk-vm3-he-de | 2 ++
4 files changed, 37 insertions(+), 4 deletions(-)
diff --git a/Jenkinsfile b/Jenkinsfile
index 262cd44..15ae524 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -41,8 +41,8 @@ timeout(time: 12, unit: 'HOURS') {
}
sh "docker run -d --restart=always --name registry -v
\"$HOME\"/certs:/certs \
- -e REGISTRY_HTTP_ADDR=0.0.0.0:${port} -e
REGISTRY_HTTP_TLS_CERTIFICATE=/certs/${cert} \
- -e REGISTRY_HTTP_TLS_KEY=/certs/${key} -p ${port}:${port}
registry:2"
+ -e REGISTRY_HTTP_ADDR=0.0.0.0:${port} -e
REGISTRY_HTTP_TLS_CERTIFICATE=/certs/${cert} \
+ -e REGISTRY_HTTP_TLS_KEY=/certs/${key} -p
${port}:${port} registry:2"
// Build the controller and invoker images.
sh "./gradlew distDocker
-PdockerRegistry=${domainName}:${port}"
}
@@ -77,8 +77,35 @@ timeout(time: 12, unit: 'HOURS') {
sh 'ansible-playbook -i environments/jenkins
postdeploy.yml'
}
}
- stage('Test') {
- sh './gradlew :tests:test'
+
+ try {
+ stage('Test') {
+ sh './gradlew :tests:test'
+ }
+ } catch (exp) {
+ println("Exception:" + exp)
+ }
+
+ try {
+ stage('Shoot one invoker test') {
+ def folder = "ansible/environments/jenkins/group_vars"
+ def invoker1_node = sh(returnStdout: true,
+ script: "grep invoker1_machine
${folder}/${hostName} | cut -d: -f2").trim()
+ sh "ssh -i ${home}/secret/openwhisk_key
openwhisk@${invoker1_node} 'docker stop invoker1'"
+ sleep time: 1, unit: 'MINUTES'
+ sh './gradlew :tests:test
-Dtest.single=*WskActionTests*'
+ sh "ssh -i ${home}/secret/openwhisk_key
openwhisk@${invoker1_node} 'docker start invoker1'"
+ }
+ } catch (exp) {
+ println("Exception:" + exp)
+ }
+
+ stage('Clean up') {
+ dir("ansible") {
+ sh 'ansible-playbook -i environments/jenkins
openwhisk.yml -e mode=clean'
+ sh 'ansible-playbook -i environments/jenkins
apigateway.yml -e mode=clean'
+ sh 'ansible-playbook -i environments/jenkins
couchdb.yml -e mode=clean'
+ }
}
} catch (exp) {
println("Exception:" + exp)
diff --git a/ansible/environments/jenkins/group_vars/openwhisk-vm1-he-de
b/ansible/environments/jenkins/group_vars/openwhisk-vm1-he-de
index 659fdc2..f742d8a 100755
--- a/ansible/environments/jenkins/group_vars/openwhisk-vm1-he-de
+++ b/ansible/environments/jenkins/group_vars/openwhisk-vm1-he-de
@@ -34,3 +34,5 @@ env_hosts_dir: "{{ playbook_dir }}/environments/jenkins"
container_pool_akka_client: true
runtimes_enable_concurrency: true
limit_action_concurrency_max: 500
+
+invoker1_machine: openwhisk-vm3-he-de
diff --git a/ansible/environments/jenkins/group_vars/openwhisk-vm2-he-de
b/ansible/environments/jenkins/group_vars/openwhisk-vm2-he-de
index 814a060..a7fe0e0 100755
--- a/ansible/environments/jenkins/group_vars/openwhisk-vm2-he-de
+++ b/ansible/environments/jenkins/group_vars/openwhisk-vm2-he-de
@@ -35,3 +35,5 @@ container_pool_akka_client: true
runtimes_enable_concurrency: true
limit_action_concurrency_max: 500
limit_invocations_per_minute: 120
+
+invoker1_machine: openwhisk-vm1-he-de
diff --git a/ansible/environments/jenkins/group_vars/openwhisk-vm3-he-de
b/ansible/environments/jenkins/group_vars/openwhisk-vm3-he-de
index e5ed3f2..8ee1b80 100755
--- a/ansible/environments/jenkins/group_vars/openwhisk-vm3-he-de
+++ b/ansible/environments/jenkins/group_vars/openwhisk-vm3-he-de
@@ -34,3 +34,5 @@ env_hosts_dir: "{{ playbook_dir }}/environments/jenkins"
container_pool_akka_client: true
runtimes_enable_concurrency: true
limit_action_concurrency_max: 500
+
+invoker1_machine: openwhisk-vm2-he-de