10 Replies Latest reply on Feb 12, 2016 4:09 PM by Daniel Suen

    JOB_RESULT_KEY how to get details?

    Daniel Suen

      In my NSH, I have created a job and then execute it:


      blcli_execute DeployJob executeJobGetJobResultKey "${DEPLOY_JOB_KEY}"


      if [ $code != 0 ]; then

      echo "error running DeplyJob ..."

      exit 1


      blcli_storeenv JOB_RESULT_KEY


      May I know, with such JOB_RESULT_KEY, how do I tell if there are errors or not? I saw there are some stuff under the JobRun command section, but they seem to be using the JobRunKey...


      I am a bit confused. If you have a result key, there should be a way to retrieve the result like exit code of the job launched from this script. What I want is to check if a launched job failed or not. If it failed, I want to log it (and exit 1 to signify job failure with this server) with the job running the code above. Otherwise, if there is no way to do this, I always exit 0 from the above nsh job run, we just don't know something has failed....(have to check individual launched job result, stored somewhere else in the Job folder).


      Anyone has done this before? Appreciate if you can share your thoughts on this. Thanks.