bricky 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/etc/bricks/bundle/builder +2 -1
- data/etc/bricks/mounts/builder +6 -2
- data/etc/templates/bricky/bricky.yml +4 -0
- data/lib/bricky/bricks/bundle.rb +3 -3
- data/lib/bricky/bricks/mounts.rb +16 -5
- data/lib/bricky/command.rb +2 -1
- data/lib/bricky/commands/bootstrap.rb +1 -1
- data/lib/bricky/config.rb +1 -1
- data/lib/bricky/version.rb +1 -1
- data/lib/bricky.rb +2 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZjJjYjljZWFjZDFlNWYwZTJjODAxNGQwZDg4Y2IxYTM1NmU0MGRiYQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NGFkZDk4ZmYxYjFjZTUyMzUzYTJhYjk2NDhkYzcwYzFiNTg4ODhhNQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NWFhOTYxOGM0NmVkMGY2NTE4ZDNhYmFjMjQ0NTJjNTU5Y2Q2YWRjYjI4MWM0
|
10
|
+
YmY0Y2JlOGM5NGNiYWEzMTE2NmJkYWQ0MGQ1NzFkZjA4MzI5MDg1ZTE2Mjk1
|
11
|
+
Nzk4NDg3NzlhMGUwNWY1YzRkYjBmMGE2ZGUxYjQ4YWNmYjkyY2U=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YmI4NDQxOWNmN2ZiZTlkN2U0MWMyMjM2ZDJjYTlhYjEyMTZlZGIxYTYyNTMz
|
14
|
+
NzU0NTU3N2YxNzEyMGY2YjljMTNmMDY4NDJiOTJmMGQ1MTJmNGQyODI5MWI4
|
15
|
+
ZTk4NTIwMzBkMGZmMzRlMTIyNmI5ZDYwNGIzMTc5NTdhZmE4ODg=
|
data/etc/bricks/bundle/builder
CHANGED
@@ -4,10 +4,11 @@
|
|
4
4
|
|
5
5
|
execute() {
|
6
6
|
. $BRICKS_HOME/builder
|
7
|
+
export GEM_HOME=~/.gems
|
7
8
|
|
8
9
|
info 'Vendor project with Bundler'
|
9
10
|
pushd /opt/workspace/source
|
10
|
-
gem install
|
11
|
+
command -v bundle > /dev/null 2>&1 || gem install --no-ri --no-rdoc bundler
|
11
12
|
bundle install --deployment --without=$BRICKS_BUNDLE_WITHOUT
|
12
13
|
popd
|
13
14
|
}
|
data/etc/bricks/mounts/builder
CHANGED
@@ -4,8 +4,12 @@
|
|
4
4
|
|
5
5
|
execute() {
|
6
6
|
info 'Building workspace'
|
7
|
-
|
8
|
-
|
7
|
+
|
8
|
+
pushd /bricks/mounts/volumes/
|
9
|
+
echo $BRICKS_MOUNTS_IGNORE | tr ',' '\n' > /tmp/ignore-files
|
10
|
+
rsync -a --stats --exclude-from /tmp/ignore-files . /opt/workspace
|
11
|
+
chown -R builder. /opt/workspace
|
12
|
+
popd
|
9
13
|
}
|
10
14
|
|
11
15
|
execute
|
data/lib/bricky/bricks/bundle.rb
CHANGED
@@ -7,12 +7,12 @@ module Bricky
|
|
7
7
|
def arguments
|
8
8
|
scripts_path = "#{bricks_path}/bundle"
|
9
9
|
results = ["-v #{scripts_path}:/bricks/bundle"]
|
10
|
-
results.push(cached) if config[
|
10
|
+
results.push(cached) if config['cache']
|
11
11
|
results
|
12
12
|
end
|
13
13
|
|
14
14
|
def entrypoint
|
15
|
-
|
15
|
+
'/bricks/bundle/builder'
|
16
16
|
end
|
17
17
|
|
18
18
|
def environments
|
@@ -31,7 +31,7 @@ module Bricky
|
|
31
31
|
end
|
32
32
|
|
33
33
|
def digest
|
34
|
-
Digest::MD5.file('Gemfile').hexdigest
|
34
|
+
Digest::MD5.file('Gemfile.lock').hexdigest
|
35
35
|
end
|
36
36
|
end
|
37
37
|
end
|
data/lib/bricky/bricks/mounts.rb
CHANGED
@@ -2,17 +2,28 @@ module Bricky
|
|
2
2
|
module Bricks
|
3
3
|
class Mounts < Base
|
4
4
|
def arguments
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
config.inject([command]) do |acc, mount|
|
9
|
-
acc << "-v #{File.expand_path(mount.last)}:/bricks/mounts/volumes/#{mount.first}"
|
5
|
+
result = config.inject([commands_volume]) do |acc, mount|
|
6
|
+
acc << mount_point(mount.last, mount.first) if not mount.first.eql? "ignore"
|
7
|
+
acc
|
10
8
|
end
|
11
9
|
end
|
12
10
|
|
13
11
|
def entrypoint
|
14
12
|
"/bricks/mounts/builder"
|
15
13
|
end
|
14
|
+
|
15
|
+
def environments
|
16
|
+
["-e BRICKS_MOUNTS_IGNORE='#{config.fetch('ignore', []).join(',')}'"]
|
17
|
+
end
|
18
|
+
|
19
|
+
private
|
20
|
+
def commands_volume
|
21
|
+
"-v #{bricks_path}/mounts:/bricks/mounts"
|
22
|
+
end
|
23
|
+
|
24
|
+
def mount_point(path, name)
|
25
|
+
"-v #{File.expand_path(path)}:/bricks/mounts/volumes/#{name}"
|
26
|
+
end
|
16
27
|
end
|
17
28
|
end
|
18
29
|
end
|
data/lib/bricky/command.rb
CHANGED
@@ -2,6 +2,7 @@ require "thor"
|
|
2
2
|
require "ostruct"
|
3
3
|
require "colorize"
|
4
4
|
|
5
|
+
require "bricky/image"
|
5
6
|
require "bricky/requirements"
|
6
7
|
require "bricky/commands/base"
|
7
8
|
require "bricky/commands/install"
|
@@ -36,7 +37,7 @@ module Bricky
|
|
36
37
|
end
|
37
38
|
|
38
39
|
def dispatch(name)
|
39
|
-
clazz =
|
40
|
+
clazz = Bricky::Commands.const_get("#{name.to_s.capitalize}")
|
40
41
|
command = clazz.new(options)
|
41
42
|
command.execute
|
42
43
|
end
|
@@ -35,7 +35,7 @@ module Bricky
|
|
35
35
|
end
|
36
36
|
|
37
37
|
def create_hack_image(image)
|
38
|
-
hack_path = FileUtils::mkdir_p("#{Bricky.config.tmp_path}/
|
38
|
+
hack_path = FileUtils::mkdir_p("#{Bricky.config.tmp_path}/patch/").first
|
39
39
|
File.open("#{hack_path}/Dockerfile", "w") { |file| file.write(parse_hack_template(image)) }
|
40
40
|
hack_path
|
41
41
|
end
|
data/lib/bricky/config.rb
CHANGED
data/lib/bricky/version.rb
CHANGED
data/lib/bricky.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bricky
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- andrerocker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-05-
|
11
|
+
date: 2015-05-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -56,16 +56,16 @@ dependencies:
|
|
56
56
|
name: thor
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ! '>'
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.
|
61
|
+
version: '0.14'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ! '>'
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 0.
|
68
|
+
version: '0.14'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: colorize
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|