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 +8 -8
- data/lib/dockly/bash_builder.rb +1 -0
- data/lib/dockly/rpm.rb +9 -0
- data/lib/dockly/version.rb +1 -1
- data/snippets/get_and_install_rpm.erb +13 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MzY4MzVhN2RiNzU5NWE1ODk1OGExNDZkZTBjNTU1YWRmYTkzMTU5Mg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
Mjc4NDA2MjBkNDlmZWFmYjI0NDg1MWY5MjFiYjVkZTk3Zjc3YzhmZA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MmZjYjkzNmZiOTE3OTk4YTVjYWVjNzFiNzBiMWU5Y2I1MzYzODNhMWI2ZDE3
|
10
|
+
NTE2MTcyMWMxYmJkMzRiZTNlNzFjZmU4YTM0NGJiYjkwNDRkNmI2OTYxOWI1
|
11
|
+
OWQwOTVhNTFhM2VkMzNiZTVlZmQ4MWRjOTExYzE0MjY1M2IwOWU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YmE0NDhiNTBhYTU3N2RhNzk3NDMyYzExOTVlZjdmYjk3NmNjM2E1OTQ2NTFl
|
14
|
+
MDRlZjQxZDZjOGEyMzk1ODIwZDUyNTdkMTM5NTk3ZjllOTUzM2IzODVkZjY5
|
15
|
+
NWE2ODU5NmIxOTgwYTVlMmZkZTViM2I3N2ZlNzVkYmE3MDJkMTE=
|
data/lib/dockly/bash_builder.rb
CHANGED
@@ -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]
|
data/lib/dockly/rpm.rb
CHANGED
@@ -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"
|
data/lib/dockly/version.rb
CHANGED
@@ -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
|
+
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-
|
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
|