dockly 3.0.4 → 3.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ODhhMjA1MzAwZGY2ZmVkYzJiYjUxZjk3ZmM1MDM0OTI2MWY5NGJlMA==
4
+ MzY4MzVhN2RiNzU5NWE1ODk1OGExNDZkZTBjNTU1YWRmYTkzMTU5Mg==
5
5
  data.tar.gz: !binary |-
6
- YjU3NzRlOTE4ZmY3ZDAyOGI0YjI0ZDM4OWY3YTJlZjI2ZGY3ZWFmNg==
6
+ Mjc4NDA2MjBkNDlmZWFmYjI0NDg1MWY5MjFiYjVkZTk3Zjc3YzhmZA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZTBjY2M0ODFlNzU5NDlmNTU0M2UwZjgzZmRiODcyMGVjNzJhNGZhZWM2NjA3
10
- MDkwNTNiNGVmZTJhMWIwOGJlNTQwZjJiYzkxM2Y5ZTQxYzM2NjBiNmFhMDc5
11
- MTIyNjU5NDZlZmVhMmU0NzQ3NGJiYTg5Y2ExZTI4M2Q2ZTc4ZGM=
9
+ MmZjYjkzNmZiOTE3OTk4YTVjYWVjNzFiNzBiMWU5Y2I1MzYzODNhMWI2ZDE3
10
+ NTE2MTcyMWMxYmJkMzRiZTNlNzFjZmU4YTM0NGJiYjkwNDRkNmI2OTYxOWI1
11
+ OWQwOTVhNTFhM2VkMzNiZTVlZmQ4MWRjOTExYzE0MjY1M2IwOWU=
12
12
  data.tar.gz: !binary |-
13
- NTgxN2ZjYWYzMjg4YTI1MmE4OGRlODZmZTQ2MTFlZTdhNmVjNWM0MzYyYzE2
14
- MDcxMzU3N2U5ZGFhZDUxNjI5NDQ2OTI3YTQxNmE0YmIzZGU1NTNhZmQyYTU2
15
- N2I3YTdjZjQyOGRiNTJhZDI2ZGM1MDQ1ZWQxZWNmMmYzOGUyY2Q=
13
+ YmE0NDhiNTBhYTU3N2RhNzk3NDMyYzExOTVlZjdmYjk3NmNjM2E1OTQ2NTFl
14
+ MDRlZjQxZDZjOGEyMzk1ODIwZDUyNTdkMTM5NTk3ZjllOTUzM2IzODVkZjY5
15
+ NWE2ODU5NmIxOTgwYTVlMmZkZTViM2I3N2ZlNzVkYmE3MDJkMTE=
@@ -17,6 +17,7 @@ module Dockly
17
17
 
18
18
  generate_snippet_for :normalize_for_dockly, []
19
19
  generate_snippet_for :get_and_install_deb, [:s3_url, :deb_path]
20
+ generate_snippet_for :get_and_install_rpm, [:s3_url, :rpm_path]
20
21
 
21
22
  generate_snippet_for :file_docker_import, [:path, :repo, :tag]
22
23
  generate_snippet_for :file_diff_docker_import, [:base_image, :diff_image, :repo, :tag]
@@ -10,6 +10,15 @@ class Dockly::Rpm < Dockly::Deb
10
10
  "#{package_name}_#{version}.#{release}_#{arch}.rpm"
11
11
  end
12
12
 
13
+ def startup_script
14
+ scripts = []
15
+ bb = Dockly::BashBuilder.new
16
+ scripts << bb.normalize_for_dockly
17
+ scripts << bb.get_and_install_rpm(s3_url, "/opt/dockly/#{File.basename(s3_url)}")
18
+
19
+ scripts.join("\n")
20
+ end
21
+
13
22
  private
14
23
  def convert_package
15
24
  debug "converting to rpm"
@@ -1,7 +1,7 @@
1
1
  module Dockly
2
2
  MAJOR = 3
3
3
  MINOR = 0
4
- PATCH = 4
4
+ PATCH = 5
5
5
  RELEASE = nil
6
6
 
7
7
  VERSION = [MAJOR, MINOR, PATCH, RELEASE].compact.join('.')
@@ -0,0 +1,13 @@
1
+ worked=1
2
+ s3_path="<%= data[:s3_url] %>"
3
+ output_path="<%= data[:rpm_path] %>"
4
+ log "fetch: starting to fetch $s3_path"
5
+ for attempt in {1..200}; do
6
+ [[ $worked != 0 ]] || break
7
+ log "fetch: attempt ${attempt} to get $s3_path ..."
8
+ timeout 600 aws s3 cp --quiet $s3_path $output_path 2> >(log) && worked=0 || (log "fetch: attempt failed, sleeping 30"; sleep 30)
9
+ done
10
+ [[ $worked != 0 ]] && fatal "fetch: failed to pull rpm from S3"
11
+ log "fetch: successfully fetched $s3_path"
12
+
13
+ yum -y install "<%= data[:rpm_path] %>"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dockly
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.4
4
+ version: 3.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Swipely, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-29 00:00:00.000000000 Z
11
+ date: 2015-10-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: clamp
@@ -259,6 +259,7 @@ files:
259
259
  - snippets/file_diff_docker_import.erb
260
260
  - snippets/file_docker_import.erb
261
261
  - snippets/get_and_install_deb.erb
262
+ - snippets/get_and_install_rpm.erb
262
263
  - snippets/get_from_s3.erb
263
264
  - snippets/install_package.erb
264
265
  - snippets/normalize_for_dockly.erb