clean_hl7_deploy script

From elyograg, 4 Months ago, written in Bash, viewed 20 times. This paste will perish in 1 Second.
URL https://paste.elyograg.org/view/d06071f3 Embed
Download Paste or View Raw
  1. #!/bin/bash
  2.  
  3. copy_clean_json_to() {
  4.   LAST_OCTET=$1
  5.   shift
  6.   echo "Copying ${CI_COMMIT_SHORT_SHA} from branch ${CI_BUILD_REF_NAME} to host ${LAST_OCTET}"
  7.   echo "Commit URL ${CI_PROJECT_URL}/-/commit/${CI_BUILD_REF}"
  8.   scp clean_hl7_ccd.json root@10.20.20.${LAST_OCTET}:/opt/tools/hasa_clean_config/.
  9.   RET=$?
  10.   if [ "$RET" -ne 0 ]; then
  11.     echo "Exiting script due to exit status ${RET}"
  12.     exit ${RET}
  13.   fi
  14. }
  15.  
  16. if [ "${CI_BUILD_REF_NAME}" = "staging" ]; then
  17.   copy_clean_json_to 90
  18. elif [ "${CI_BUILD_REF_NAME}" = "main" ]; then
  19.   copy_clean_json_to 34
  20.   copy_clean_json_to 38
  21. fi
  22.  

Reply to "clean_hl7_deploy script"

Here you can reply to the paste above