29. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 9/24/2019 1:37:43 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.

29.1 Files compared

# Location File Last Modified
1 PCL-5_v1_build_8.zip\v1_build 8\Unredacted\spp_form_builder-dev.zip\spp_form_builder-dev\source\hooks rtc-pre-receive.sh Wed Jul 31 18:47:01 2019 UTC
2 PCL-5_v1_build_8.zip\v1_build 8\Unredacted\spp_form_builder-dev.zip\spp_form_builder-dev\source\hooks rtc-pre-receive.sh Fri Sep 20 20:30:09 2019 UTC

29.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 3 254
Changed 2 4
Inserted 0 0
Removed 0 0

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

29.4 Active regular expressions

No regular expressions were active.

29.5 Comparison detail

  1   #!/bin/bas h
  2  
  3   ########## ########## ########## ########## ########## ########## ########## ########## ##sm
  4   # Licensed  Materials  - Propert y of IBM
  5   # (c) Copy right IBM  Corporatio n 2017. Al l Rights R eserved.
  6  
  7   #  Note to  U.S. Gove rnment Use rs Restric ted Rights :  
  8   #  Use, du plication  or disclos ure restri cted by GS A ADP Sche dule 
  9   #  Contrac t with IBM  Corp.
  10   ########## ########## ########## ########## ########## ########## ########## ##########
  11  
  12   # CONFIGUR ATION VARI ABLES BEGI N
  13  
  14   # Location  of node i nside the  container  environmen t
  15   NODE_EXECU TABLE=/usr /bin/node
  16  
  17   # Path to  RTC Nodejs  hook scri pts. The h ooks folde r should h ave the .j s files
  18   # directly  below it.  The path  should not  end in fo rward slas h characte r
  19   RTC_NODEJS _SCRIPTS_P ATH=/usr/s hare/githo oks/server /hooks
  20  
  21   # NOTE : G it is assu med to be   found in  PATH envir onment var iable.
  22  
  23   # If you h ave config ured the R TC Web hoo k for a Gi tHub repos itory, the n provide  actual val ues for th
  24   # followin g two vari ables.
  25   # You can  reuse this  hook file  with othe r GitHub r epositorie s only if  RTC Web ho ok has bee n configur ed
  26   # for each  one of th em.
  27  
  28   # URL of G ithub repo sitory
  29   GITHUB_URL =https:// URL
  30  
  31   # The ADMI N Token is  used to q uery the G itHub  rep ository fo r RTC Web  hook.
  32   # File pat h inside t he contain er environ ment that  has the AD MIN token.
  33   # The toke n should b e on the f irst line  and should  not end w ith a new  line.
  34   GITHUB_ADM IN_TOKEN_F ILE_PATH=/ opt/github /token.txt
  35  
  36   # If you h aven't con figured th e RTC Web  hook, unco mment the  following  two variab les
  37   # and prov ide actual  values.
  38   # NOTE: Si nce RTC re pokey is d ifferent f or every G ithub repo sitory, th is file
  39   # can be u sed as a p re-receive  hook only  for a sin gle Github  repositor y.
  40  
  41  
  42   RTC_REPO_U RL=https:/ / URL                       /ccm/
  43   RTC_REPO_K EY=ae34d9b 63cd54c1db 21401944a8 5c29c
  44  
  45  
  46   # Uncommen t the expo rt stateme nt and set  the trace  level if  required
  47   # Trace me ssages are  written t o standard  output.
  48   # 1 - Erro r
  49   # 2 - Warn ing
  50   # 3 - Info
  51   # 4 - Verb ose
  52   export RTC _GIT_SERVE R_TRACE_LE VEL=4
  53  
  54   # CONFIGUR ATION VARI ABLES END
  55  
  56   # DO NOT M ODIFY THE  CODE THAT  FOLLOWS BE LOW
  57  
  58  
  59   #CONSTANTS  
  60   export REM OTE_USER=" $GITHUB_US ER_LOGIN"
  61  
  62   if [ -z $N ODE_EXECUT ABLE ]; th en
  63       # Some  Linux dis tributions  have pack age name a s nodejs
  64       NODE_E XECUTABLE= `which nod ejs`
  65   fi
  66   if [ -z $N ODE_EXECUT ABLE ]; th en
  67       echo " Node execu table path  cannot be  found. Ap pears like  it is not  part of P ATH enviro nment vari able."
  68       exit 1
  69   fi
  70  
  71   # Check wh ether Git  is on the  path, if n ot complai n and erro r out
  72   if [ -z `w hich git`  ]; then
  73       echo " Git execut able is no t found on  the PATH  environmen t variable . Add the  Git execut able path  to the sta ndard path "
  74       exit 1
  75   fi
  76  
  77   if [ -z $R TC_REPO_KE Y ]; then
  78       # extr act RTC re po key and  RTC repo  url from G ithub repo sitory's w ebhook
  79       filePa th="/tmp/` date +%s`"
  80  
  81       # URL  encode the  parameter s before s ending the m to the s cript
  82       github Url=`echo  $GITHUB_UR L | sed -r  -e 's/\// %2F/g' -e  's/\./%2E/ g' -e 's/- /%2D/g' -e  's/_/%5F/ g' -e 's/\ !/%21/g' - e 's/#/%23 /g' -e 's/ \&/%26/g'  -e 's/\(/% 28/g' -e ' s/\)/%29/g ' -e 's/\* /%2A/g' -e  's/\+/%2B /g' -e 's/ ,/%2C/g' - e 's/:/%3A /g' -e 's/ \;/%3B/g'  -e 's/\=/% 3D/g' -e ' s/\?/%3F/g ' -e 's/\@ /%40/g' -e  's/\[/%5B /g' -e 's/ \]/%5D/g'  -e 's/ /%2 0/g'`
  83       github TokenFileP ath=`echo  $GITHUB_AD MIN_TOKEN_ FILE_PATH  | sed -r - e 's/\//%2 F/g' -e 's /\./%2E/g'  -e 's/-/% 2D/g' -e ' s/_/%5F/g'  -e 's/\!/ %21/g' -e  's/#/%23/g ' -e 's/\& /%26/g' -e  's/\(/%28 /g' -e 's/ \)/%29/g'  -e 's/\*/% 2A/g' -e ' s/\+/%2B/g ' -e 's/,/ %2C/g' -e  's/:/%3A/g ' -e 's/\; /%3B/g' -e  's/\=/%3D /g' -e 's/ \?/%3F/g'  -e 's/\@/% 40/g' -e ' s/\[/%5B/g ' -e 's/\] /%5D/g' -e  's/ /%20/ g'`
  84       github RepoName=` echo $GITH UB_REPO_NA ME | sed - r -e 's/\/ /%2F/g' -e  's/\./%2E /g' -e 's/ -/%2D/g' - e 's/_/%5F /g' -e 's/ \!/%21/g'  -e 's/#/%2 3/g' -e 's /\&/%26/g'  -e 's/\(/ %28/g' -e  's/\)/%29/ g' -e 's/\ */%2A/g' - e 's/\+/%2 B/g' -e 's /,/%2C/g'  -e 's/:/%3 A/g' -e 's /\;/%3B/g'  -e 's/\=/ %3D/g' -e  's/\?/%3F/ g' -e 's/\ @/%40/g' - e 's/\[/%5 B/g' -e 's /\]/%5D/g'  -e 's/ /% 20/g'`
  85  
  86       # invo ke GithubD ataRetriev er script
  87       "$NODE _EXECUTABL E" "$RTC_N ODEJS_SCRI PTS_PATH/G ithubDataR etriever.j s" "?githu brepourl=$ githubUrl& githubadmi ntokenpath =$githubTo kenFilePat h&githubre poname=$gi thubRepoNa me&filepat h=$filePat h"
  88  
  89       if [ $ ? -ne 0 ];
  90       then
  91           if  [ -e $fil ePath ]; t hen
  92                rm $file Path
  93           fi
  94           ex it 1
  95       fi
  96   fi
  97  
  98   qs=""
  99   while read  old_sha1  new_sha1 r ef_name; d o
  100       qs+="o ld_sha1=$o ld_sha1&"
  101       qs+="n ew_sha1=$n ew_sha1&"
  102       ref_na me_escaped =`echo $re f_name | s ed -r -e ' s/\//%2F/g ' -e 's/\. /%2E/g' -e  's/-/%2D/ g' -e 's/_ /%5F/g' -e  's/\!/%21 /g' -e 's/ #/%23/g' - e 's/\&/%2 6/g' -e 's /\(/%28/g'  -e 's/\)/ %29/g' -e  's/\*/%2A/ g' -e 's/\ +/%2B/g' - e 's/,/%2C /g' -e 's/ :/%3A/g' - e 's/\;/%3 B/g' -e 's /\=/%3D/g'  -e 's/\?/ %3F/g' -e  's/\@/%40/ g' -e 's/\ [/%5B/g' - e 's/\]/%5 D/g' -e 's / /%20/g'`
  103       qs+="r ef_name=$r ef_name_es caped&"
  104   done
  105  
  106   # from the  file, rea d in the t ext and ap pend it to  qs if RTC _REPO_KEY  is empty
  107   if [ -z $R TC_REPO_KE Y ]; then
  108       qs+=`c at $filePa th`
  109   else 
  110       # Appe nd RTC_REP O_KEY and  encode and  append RT C_REPO_URL  to qs
  111       qs+="r tcrepokey= $RTC_REPO_ KEY&"
  112       rtcrep ourl_escap ed=`echo $ RTC_REPO_U RL | sed - r -e 's/\/ /%2F/g' -e  's/\./%2E /g' -e 's/ -/%2D/g' - e 's/_/%5F /g' -e 's/ \!/%21/g'  -e 's/#/%2 3/g' -e 's /\&/%26/g'  -e 's/\(/ %28/g' -e  's/\)/%29/ g' -e 's/\ */%2A/g' - e 's/\+/%2 B/g' -e 's /,/%2C/g'  -e 's/:/%3 A/g' -e 's /\;/%3B/g'  -e 's/\=/ %3D/g' -e  's/\?/%3F/ g' -e 's/\ @/%40/g' - e 's/\[/%5 B/g' -e 's /\]/%5D/g'  -e 's/ /% 20/g'`
  113       qs+="r tcrepourl= $rtcrepour l_escaped& "
  114   fi
  115  
  116   "$NODE_EXE CUTABLE" " $RTC_NODEJ S_SCRIPTS_ PATH/Valid atePush.js " $qs
  117   errorCode= $?
  118  
  119   # Before l eaving, de lete the t emporary f ile holdin g the RTC  repo url a nd repo ke y, if it e xists
  120   if [ -e $f ilePath ];  then
  121       rm $fi lePath
  122   fi
  123  
  124   if [ $erro rCode -ne  0 ]; 
  125   then
  126       exit 1
  127   fi
  128  
  129   exit 0