message: [GHA][LBT] handle non-zero cti exit code
  Closes:
  Approved by: andll
diff: @@ -63,6 +63,7 @@ jobs:
  --report report.json \
  --suite land_blocking
  ret=$?
  + echo "::set-env name=CTI_EXIT_CODE::$ret"
  if [ -s "report.json" ]; then
  echo "report.json start"
  cat report.json
  @@ -123,6 +124,11 @@ jobs:
  ${result.text}
  \`\`\`
  `;
  + // Check CTI exit code for errors
  + if (parseInt(env_vars.CTI_EXIT_CODE) != 0) {
  + body += "\n :exclamation: Cluster Test failed - non-zero exit code for `cti` \n"
  + should_fail = true;
  + } else {
  let tps = result.metrics.find(m => m.experiment == "all up" && m.metric == "avg_tps").value;
  let min_tps = 900;
  if (tps < min_tps) {
  @@ -130,6 +136,7 @@ jobs:
  body += "\n TPS with PR: " + tps + ", this is lower then minimum allowed " + min_tps + " TPS.";
  should_fail = true;
  }
  + }
  } catch (err) {
  if (err.code === 'ENOENT') {
  body = "Cluster Test failed - no test report found.\n";
  