Produced by Araxis Merge on 10/3/2017 11:15:02 AM 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.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | ehmp.zip\ehmp\ehmp\product\production\cache | Rakefile | Mon Jul 10 17:46:22 2017 UTC |
| 2 | ehmp.zip\ehmp\ehmp\product\production\cache | Rakefile | Mon Oct 2 19:41:22 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 138 |
| Changed | 1 | 2 |
| Inserted | 0 | 0 |
| Removed | 0 | 0 |
| 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 |
No regular expressions were active.
| 1 | # | |
| 2 | # Rakefile for cache repositor y | |
| 3 | # | |
| 4 | ||
| 5 | require "r ubygems" | |
| 6 | require "n exus_cli" | |
| 7 | require "n et/ssh" | |
| 8 | require "n et/scp" | |
| 9 | require Fi le.expand_ path('../. ./tests/kn ife-helper .rb', File .dirname(_ _FILE__)) | |
| 10 | ||
| 11 | task :pull _cache, :d river do | t, args| | |
| 12 | puts "IN FO: Pullin g the cach e.dat zip from vista -kodak-#{E NV['JOB_NA ME']}" | |
| 13 | key = kn ife_search _for_key_n ame("vista -kodak", a rgs[:drive r]) | |
| 14 | user = arg s[:driver] == "aws" ? " DNS " : "vagra nt" | |
| 15 | ip = kni fe_search_ for_ip("vi sta-kodak" ) | |
| 16 | puts "In ternal IP for Silver is #{ip}" | |
| 17 | mkdir Fi le.expand_ path("vist a", File.d irname(__F ILE__)) un less Dir.e xist? File .expand_pa th("vista" , File.dir name(__FIL E__)) | |
| 18 | tmp_zip_ path = "/t mp/vista.z ip" | |
| 19 | ss h = Net::S SH.start( ip, user, :keys => k ey ) | |
| 20 | ssh.exec !('sudo cc ontrol sto p CACHE qu ietly') do |ch, stre am, line| | |
| 21 | puts l ine | |
| 22 | end | |
| 23 | ssh.exec !("sudo zi p -j #{tmp _zip_path} /usr/cach esys/mgr/V ISTA/CACHE .DAT") do |ch, strea m, line| | |
| 24 | puts l ine | |
| 25 | end | |
| 26 | ssh.scp. download! tmp_zip_pa th, "vista /vista.zip " | |
| 27 | ssh.exec !('sudo cc ontrol sta rt CACHE') do |ch, s tream, lin e| | |
| 28 | puts l ine | |
| 29 | end | |
| 30 | ssh.clos e | |
| 31 | end | |
| 32 | ||
| 33 | task :uplo ad_cache, :version d o |t, args | | |
| 34 | puts "CA CHE_VERSIO N='#{args[ :version]} '" | |
| 35 | puts "IN FO: Uploa ding cache version: #{args[:ve rsion]} to " | |
| 36 | puts "IN FO: https ://store.v istacore.u s/nexus/co ntent/repo sitories/r eleases/us /vistacore /vista/#{a rgs[:versi on]}/vista -#{args[:v ersion]}.z ip" | |
| 37 | artifact _path = Fi le.expand_ path("vist a/vista.zi p", File.d irname(__F ILE__)) | |
| 38 | upload_a rtifact("u s.vistacor e", "vista ", "zip", args[:vers ion], "rel eases", ar tifact_pat h) | |
| 39 | end | |
| 40 | ||
| 41 | task :remo ve_cache d o | |
| 42 | FileUtil s.rm_rf(Fi le.expand_ path("vist a", File.d irname(__F ILE__))) | |
| 43 | end | |
| 44 | ||
| 45 | def upload _artifact( group_id, artifact_i d, artifac t_ext, ver sion, repo sitory, ar tifact_pat h) | |
| 46 | ra ise "Artif act does n ot exist a t #{artifa ct_path}" unless Fil e.exist?(a rtifact_pa th) | |
| 47 | co ordinates = "#{group _id}:#{art ifact_id}: #{artifact _ext}:#{ve rsion}" | |
| 48 | us ername = E NV["NEXUS_ USER_NAME" ] | |
| 49 | pa ssword = E NV["NEXUS_ PASSWORD"] | |
| 50 | ba se_url = " https://st ore.vistac ore.us/nex us" | |
| 51 | ne xus_remote = NexusCl i::RemoteF actory.cre ate( | |
| 52 | { | |
| 53 | 'url' => base_url, | |
| 54 | 'reposit ory' => re pository, | |
| 55 | 'usernam e' => user name, | |
| 56 | 'passwor d' => pass word | |
| 57 | } | |
| 58 | ) | |
| 59 | ch eck_artifa ct_does_no t_exist(ne xus_remote ,coordinat es) | |
| 60 | nexus_re mote.push_ artifact(c oordinates , artifact _path) | |
| 61 | end | |
| 62 | ||
| 63 | def check_ artifact_d oes_not_ex ist(nexus_ remote, co ordinates) | |
| 64 | be gin | |
| 65 | nexu s_remote.g et_artifac t_info(coo rdinates) | |
| 66 | re scue | |
| 67 | retu rn | |
| 68 | en d | |
| 69 | ra ise "\n\n\ nArtifact already ex ists at #{ coordinate s}; not up loading\n\ n\n\n" | |
| 70 | end |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.