573. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 7/6/2017 8:23:27 PM Central 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.

573.1 Files compared

# Location File Last Modified
1 OSCIF_CTT_v4_build 1.zip\rails_prisme\app\jobs deploy_war_job.rb Wed May 31 03:59:06 2017 UTC
2 OSCIF_CTT_v4_build 1.zip\rails_prisme\app\jobs deploy_war_job.rb Mon Jul 3 23:22:11 2017 UTC

573.2 Comparison summary

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

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

573.4 Active regular expressions

No regular expressions were active.

573.5 Comparison detail

  1   require '. /lib/cargo '
  2   require 'f ileutils'
  3  
  4   class Depl oyWarJob <  PrismeBas eJob
  5  
  6     @@mutex  = Mutex.ne w
  7  
  8     def perf orm(*args)
  9       begin
  10         logg er = Cargo Support::C argoLogger .new
  11         file _name = ar gs.shift
  12         cont ext = args .shift
  13         tomc at_ar = ar gs.shift
  14  
  15         unle ss context .nil?
  16           fi le_type =  File.extna me(file_na me)
  17           fi le_dir = F ile.dirnam e(file_nam e)
  18           ne w_file = f ile_dir +  context +  file_type
  19           Fi leUtils.cp (file_name , new_file )
  20           fi le_name =  new_file
  21         end
  22  
  23         fact ory = JCar go::Defaul tContainer Factory.ne w
  24         type  = JCargo: :Container Type::REMO TE
  25         runt ime_config  = JCargo: :TomcatRun timeConfig uration.ne w
  26         prop s = tomcat _ar.proper ties_hash
  27         prop s.each_pai r do |k, v |
  28           #c argo.hostn ame = loca lhost ever ytime
  29           #c argo.servl et.port =  localhost  everytime
  30           ru ntime_conf ig.setProp erty(k, v)
  31           $l og.debug(" Added #{k}  -- #{v} t o the runt ime config .")
  32         end
  33         if p rops[Prism eService:: CARGO_REMO TE_URL].st rip.start_ with?('htt ps')
  34           ru ntime_conf ig.setProp erty(Prism eService:: CARGO_PROT OCOL, 'htt ps')
  35           $l og.info('S etting the  cargo pro tocol to h ttps.')
  36         end
  37         tom_ container  = factory. createCont ainer('tom cat8x', ty pe, runtim e_config)
  38         depl oyable_typ e = JCargo ::Deployab leType::WA R
  39         depl oyer_facto ry = JCarg o::Default Deployable Factory.ne w
  40         remo te_contain er = JCarg o::Tomcat8 xRemoteCon tainer.new (runtime_c onfig)
  41         depl oyer = JCa rgo::Tomca t8xRemoteD eployer.ne w(remote_c ontainer)
  42         depl oyer.setLo gger(logge r)
  43         #to_ do: pull s tring belo w from Act iveRecord
  44         #url .registerL istener(De ployListen er.new)
  45         war  = deployer _factory.c reateDeplo yable(tom_ container. getId(), f ile_name,  deployable _type)
  46         #to_ do -- swit ch to unde ploy/redep loy
  47         $log .info("Abo ut to depl oy #{file_ name}")
  48         #onl y allow on e deployme nt at a ti me.TomcatR untimeConf iguration
  49         #The  user will  see their  job as ru nning, but , since ca rgo was en gineered f or maven a nd communi cates via  props
  50         #we  cannot hav e a user s electing a  different  tomcat mo tivating d eployment  to the wro ng server.
  51           url = JCar go::URLDep loyableMon itor.new(j ava.net.UR L.new(prop s[PrismeSe rvice::CAR GO_REMOTE_ URL])) #(" http:// URL . DNS : PORT /"))
  52         url. setLogger( logger)
  53         depl oyer.redep loy(war, u rl)
  54         $log .info("Dep loyed #{fi le_name}")
  55       rescue  => ex
  56         $log .error("A  Java Excep tion was t hrown: #{e x.message} ")
  57         $log .error(ex. backtrace. join("\n") )
  58         rais e CargoSup port::Carg oError.new (ex.messag e)
  59       ensure
  60         resu lts = logg er.results
  61         resu lts_hash =  {tooltip:  results,  message: " Deployed # {file_name }"}
  62         save _result re sults, res ults_hash
  63       end
  64     end
  65  
  66     def self .tooltip(a r)
  67       result _hash(ar)[ :tooltip.t o_s]
  68     end
  69  
  70     def self .message(a r)
  71       result _hash(ar)[ :message.t o_s]
  72     end
  73  
  74   end
  75   #below mov es to acti ve record  later (ser vice libra ries)
  76   # java.lan g.System.g etProperti es.put('ca rgo.remote .username' , 'devtest ')
  77   # java.lan g.System.g etProperti es.put('ca rgo.remote .password' , 'devtest ')
  78   # java.lan g.System.g etProperti es.put('ca rgo.tomcat .manager.u rl', 'http :// URL . DNS : PORT
  79   # java.lan g.System.g etProperti es.put('ca rgo.servle t.port', ' PORT ')
  80   # java.lan g.System.g etProperti es.put('ca rgo.hostna me', ' DNS                 ')