26350. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 5/14/2018 1:18:44 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.

26350.1 Files compared

# Location File Last Modified
1 MCCF_EDI_TAS_Infrastructure.zip\MCCF_EDI_TAS_Infrastructure\mccf_devops\scripts\shell installJenkins.sh Tue Mar 27 23:55:34 2018 UTC
2 MCCF_EDI_TAS_Infrastructure.zip\MCCF_EDI_TAS_Infrastructure\mccf_devops\scripts\shell installJenkins.sh Thu May 10 15:49:38 2018 UTC

26350.2 Comparison summary

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

26350.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

26350.4 Active regular expressions

No regular expressions were active.

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