Merge "Add OSS installation steps to cloud-deploy pipeline"
diff --git a/opencontrail-upgrade.groovy b/opencontrail-upgrade.groovy
index 805b856..83f17ee 100644
--- a/opencontrail-upgrade.groovy
+++ b/opencontrail-upgrade.groovy
@@ -39,6 +39,10 @@
out = salt.runSaltCommand(pepperEnv, 'local', ['expression': target, 'type': 'compound'], command, null, args, null)
salt.printSaltCommandResult(out)
+ // if Error occured - throw exception
+ if (out.toString().contains('E: ')) {
+ throw new Exception("Command execution failed")
+ }
// wait until $check is in correct state
if ( check == "nodetool status" ) {
salt.commandStatus(pepperEnv, target, check, 'Status=Up')
@@ -81,8 +85,7 @@
try {
salt.cmdRun(pepperEnv, 'I@opencontrail:control', "su root -c '/usr/local/bin/zookeeper-backup-runner.sh'")
} catch (Exception er) {
- common.errorMsg('Zookeeper failed to backup. Please fix it before continuing.')
- return
+ throw new Exception('Zookeeper failed to backup. Please fix it before continuing.')
}
salt.enforceState(pepperEnv, 'I@cassandra:backup:server', 'cassandra.backup')
@@ -91,8 +94,7 @@
try {
salt.cmdRun(pepperEnv, 'I@cassandra:backup:client', "su root -c '/usr/local/bin/cassandra-backup-runner-call.sh'")
} catch (Exception er) {
- common.errorMsg('Cassandra failed to backup. Please fix it before continuing.')
- return
+ throw new Exception('Cassandra failed to backup. Please fix it before continuing.')
}
args = 'apt install contrail-database -y;'
diff --git a/validate-cloud.groovy b/validate-cloud.groovy
index 6159a96..f1a4ab1 100644
--- a/validate-cloud.groovy
+++ b/validate-cloud.groovy
@@ -27,6 +27,8 @@
* RALLY_FLAVOR The name of the flavor for Rally image
* RALLY_CONFIG_REPO Git repository with files for Rally
* RALLY_CONFIG_BRANCH Git branch which will be used during the checkout
+ * RALLY_SCENARIOS Path to file or directory with rally scenarios
+ * RALLY_TASK_ARGS_FILE Path to file with rally tests arguments
* TEST_K8S_API_SERVER Kubernetes API address
* TEST_K8S_CONFORMANCE_IMAGE Path to docker image with conformance e2e tests
* TEST_K8S_NODE Kubernetes node to run tests from
@@ -71,7 +73,7 @@
"rally_image=${RALLY_IMAGE}",
"rally_flavor=${RALLY_FLAVOR}",
"availability_zone=${AVAILABILITY_ZONE}"]
- validate.runRallyTests(pepperEnv, TARGET_NODE, TEST_IMAGE, artifacts_dir, RALLY_CONFIG_REPO, RALLY_CONFIG_BRANCH, rally_variables)
+ validate.runRallyTests(pepperEnv, TARGET_NODE, TEST_IMAGE, artifacts_dir, RALLY_CONFIG_REPO, RALLY_CONFIG_BRANCH, RALLY_SCENARIOS, RALLY_TASK_ARGS_FILE, rally_variables)
} else {
common.infoMsg("Skipping Rally tests")
}