290. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 4/18/2019 5:55:27 PM Eastern Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

290.1 Files compared

# Location File Last Modified
1 MCCF_EDI_TAS_TASCore v2.0_Build_10.zip\MCCF_EDI_TAS_DevOps\mccf_devops\scripts\shell installRTCTools.sh Wed Apr 3 02:27:18 2019 UTC
2 MCCF_EDI_TAS_TASCore v2.0_Build_10.zip\MCCF_EDI_TAS_DevOps\mccf_devops\scripts\shell installRTCTools.sh Tue Apr 16 15:27:28 2019 UTC

290.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 2 332
Changed 1 2
Inserted 0 0
Removed 0 0

290.3 Comparison options

Whitespace
Character case Differences in character case are significant
Line endings Differences in line endings (CR and LF characters) are ignored
CR/LF characters Not shown in the comparison detail

290.4 Active regular expressions

No regular expressions were active.

290.5 Comparison detail

  1   #!/bin/bas h
  2   #
  3   #set -x
  4  
  5   scriptname =${0}
  6   scriptBase ="$( cd "$ ( dirname  "$scriptna me" )";  p wd)"
  7   VAULTPASS_ PATH="~/.v ault_pass"
  8   REPO_FILE= "rtcTools- requiremen ts.yml"
  9   ROOT_DIR=" $( cd ../. .;  pwd)"
  10   TIMESTAMP= `date "+%Y %m%d_%H%M% S"`
  11   LOG_DIR="$ {ROOT_DIR} /logs"
  12   LOGFILE="$ {LOG_DIR}/ rtcToolsIn stall_${TI MESTAMP}.l og"
  13   HOSTS=ci-s erver
  14   playbooks= ("install- rtcTools.y ml")
  15   function u sage() {
  16     echo "us age: $scri ptname -e  ENV"
  17     echo "       where  ENV = AWS_ DEV | MAG_ ALL | MAG_ CI | MAG_C IT | MAG_D EV | MAG_S QA | MAG_U AT | local "
  18     echo "op tional arg uments: "
  19     echo "   -u|--user  Bitbucket  Username"
  20     echo "   -p|--pass  Bitbucket  Password"
  21     echo "   -l|--logfi le logfile "
  22     echo "   -c|--nocol or (for no color)]"
  23     exit 1
  24   }
  25  
  26   # ReadArgs  reads the  command l ine argume nts passed  to it
  27   # and popu lates shel l variable s accordin gly
  28   ReadArgs()  {
  29     LOGTXT " Entered Re adArg"
  30     while [[  $# -gt 0  ]] ; do
  31       key="$ 1"
  32       case $ key in
  33         -c |  --nocolor  )
  34               UseColor= No
  35               CLEAR=""
  36               COL60=""
  37               NORMAL=""
  38               WHITE=""
  39               GREEN=""
  40               RED=""
  41               YELLOW=""
  42               BLUE=""
  43               shift # p ast argume nt
  44               LOGTXT "P rocessing  without co lor"
  45               ;;
  46         -l |  --logfile  )
  47               if [[ $#  -ge 2 ]] ;  then
  48                 LOGFILE ="$2"
  49               else
  50                 DEBUG " $1 argumen t requires  another a rgument af ter it"
  51                 LOGTXT  "Error in  $1 argumen t (no next  argument  provided)"
  52                 exit 9
  53               fi
  54               LOGTXT "U sing LogFi le $LOGFIL E instead"
  55               # DEBUG   "Log outpu t redirect ed to $LOG FILE"
  56               shift # p ast argume nt
  57               shift # p ast logfil e entry
  58              ;;
  59         -u |  --user )
  60               if [[ $#  -ge 2 ]] ;  then
  61                 USERNAM E="$2"
  62               else
  63                 DEBUG " argument $ 1 requires  another a rgument af ter it"
  64                 LOGTXT  "Error in  $1 argumen t (no next  argument  provided)"
  65                 exit 9
  66               fi
  67               LOGTXT "U SERNAME: $ USERNAME "
  68               # DEBUG   "USERNAME:  $USERNAME  "
  69               shift # p ast argume nt
  70               shift # p ast fqdn e ntry
  71               ;;
  72         -p |  --pass )
  73               if [[ $#  -ge 2 ]] ;  then
  74                 PASSWD= "$2"
  75               else
  76                 DEBUG " argument $ 1 requires  another a rgument af ter it"
  77                 LOGTXT  "Error in  $1 argumen t (no next  argument  provided)"
  78                 exit 9
  79               fi
  80               LOGTXT "U sing suppl ied passwo rd "
  81               # DEBUG   "Using sup plied pass word $PASS WD "
  82               shift # p ast argume nt
  83               shift # p ast fqdn e ntry
  84               ;;
  85         -s |  --skiprol es )
  86               skiproles ="true"
  87               LOGTXT "s kiproles:  $skiproles , not coll ecting rol es from mc cf BB repo s"
  88               DEBUG "sk iproles: $ skiproles,  not colle cting role s from mcc f BB repos "
  89               shift # p ast argume nt
  90               ;;
  91         -e |  --env )
  92               if [[ $#  -ge 2 ]] ;  then
  93                 ENV="$2 "
  94               else
  95                 DEBUG " argument $ 1 requires  another a rgument af ter it"
  96                 LOGTXT  "Error in  $1 argumen t (no next  argument  provided)"
  97                 exit 9
  98               fi
  99               LOGTXT "E nvironment : $ENV"
  100               # DEBUG   "Environme nt $ENV"
  101               shift # p ast argume nt
  102               shift # p ast fqdn e ntry
  103               ;;
  104         * )   DEBUG "$1  is not a  valid argu ment"
  105               LOGTXT "$ 1 is not a  valid arg ument"
  106               exit 9
  107               ;;
  108       esac
  109     done
  110     LOGTXT " Exited Rea dArgs"
  111   }
  112  
  113   #source th e commonfu nctions
  114   . "$script Base/commo nfunctions .sh"
  115  
  116   ReadArgs $ *
  117  
  118   DEBUG "scr iptBase: $ {scriptBas e}"
  119   DEBUG "ROO T_DIR: ${R OOT_DIR}"
  120   DEBUG "log ging to: $ {LOGFILE}"
  121   DEBUG "vau lt pass pa th: ${VAUL TPASS_PATH }"
  122  
  123   DEBUG "Che ck if log  directory  exists and  if not, c reate it"
  124   if [[ ! -d  ${LOG_DIR } ]]; then
  125     mkdir -Z  ${LOG_DIR }
  126   fi
  127  
  128   DEBUG "Ver ify ENV wa s provided "
  129   if [[ -z " ${ENV}" ]] ; then
  130     DEBUG "E NV require d"
  131     usage
  132   else
  133     DEBUG "o perating o n ENV ${EN V}"
  134   fi
  135   ansibleExt raVars="va r_hosts=${ HOSTS}"
  136  
  137   if is_true  "$skiprol es" ; then
  138     DEBUG "s kiproles s pecified,  no need to  install r oles"
  139   else
  140     DEBUG "I nstall rol es from ${ REPO_FILE} "
  141     getMCCFR oles ${REP O_FILE}
  142   fi
  143  
  144   DEBUG "Sta rting to p rocess pla ybooks on  ${HOSTS} f or $ENV en vironment  with vars:  ${ansible ExtraVars} "
  145  
  146   for item i n "${playb ooks[@]}"
  147   do
  148     playBook =${item}
  149     LOGTXT " execute pl aybook ${p layBook} f or ${ENV}  ${ansibleE xtraVars}"
  150     runAnsib lePlaybook  ${playBoo k}
  151     rtnCode= $?
  152     DEBUG "r tnCode fro m running  ansible pl aybook is  ${rtnCode} "
  153     if [[ $r tnCode -eq  0 ]]
  154     then
  155       DEBUG  "${playBoo k} complet ed success fully"
  156       LOGTXT  "${playBo ok} comple ted succes sfully for  ${ENV} on  ${HOSTS}"
  157     else
  158       DEBUG  "${playBoo k} failed:  returned:  ${rtnCode }"
  159       LOGTXT  "${playBo ok} failed : returned : ${rtnCod e}"
  160     fi
  161     exit $rt nCode
  162   done
  163  
  164   # CONTACT  INFO
  165   CONTACT="L ee Benhart PII  or  DNS . URL "
  166  
  167   exit