lib/capistrano/recipes/deploy/strategy/s3_bucket.rb
# Responsible for ensuring that the package for the current revision is in the bucket
Responsible for ensuring that the package for the current revision is in the bucket
Responsible for ensuring that the package for the current revision is in the bucket
def put_package
          set :release_name, revision
          logger.debug "#{package_name} already in bucket #{bucket_name}" and return if bucket_includes_package
          logger.debug "#{package_name} not found in bucket #{bucket_name} so ckout to add it"
          system(command)
          File.open(File.join(destination, "REVISION"), "w") { |f| f.puts(revision) }
          logger.trace "compressing in #{destination}"
          logger.trace compress('*', package_path).join(" ")
          Dir.chdir(destination) { system(compress('*', package_path).join(" ")) }
          logger.trace "pushing to S3 bucket #{bucket_name} key #{package_name}"
          system("s3cmd put #{bucket_name}:#{package_name} #{package_path}")
        end
def put_package set :release_name , revision logger . debug "#{package_name} already in bucket #{bucket_name}" and return if bucket_includes_package logger . debug "#{package_name} not found in bucket #{bucket_name} so ckout to add it" system ( command ) File . open ( File . join ( destination , "REVISION" ) , "w" ) { | f | f . puts ( revision ) } logger . trace "compressing in #{destination}" logger . trace compress ( '*' , package_path ) . join ( " " ) Dir . chdir ( destination ) { system ( compress ( '*' , package_path ) . join ( " " ) ) } logger . trace "pushing to S3 bucket #{bucket_name} key #{package_name}" system ( "s3cmd put #{bucket_name}:#{package_name} #{package_path}" ) end
Responsible for ensuring that the package for the current revision is in the bucket
Responsible for ensuring that the package for the current revision is in the bucket
# Do the checkout locally # Compress it # Put to S3