Class: Shipitron::Server::UploadBuildCache
- Inherits:
-
Object
- Object
- Shipitron::Server::UploadBuildCache
- Includes:
- Metaractor
- Defined in:
- lib/shipitron/server/upload_build_cache.rb
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/shipitron/server/upload_build_cache.rb', line 13 def call Logger.info "Uploading build cache to bucket #{s3_cache_bucket}" build_cache = Pathname.new("/home/shipitron/#{application}/#{build_cache_location}") unless build_cache.exist? Logger.warn 'Build cache not found.' return end build_cache.open('rb') do |local_file| bucket.files.create( key: "#{application}.build-cache.archive", body: local_file.read ) end end |