Skip to content

Commit fdeb788

Browse files
committed
normalize docker build tasks
1 parent 55638c2 commit fdeb788

File tree

1 file changed

+2
-29
lines changed

1 file changed

+2
-29
lines changed

Runfile

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ version Bashly::VERSION
1111

1212
RunfileTasks::RubyGems.all 'bashly'
1313
RunfileTasks::Testing.rspec
14+
RunfileTasks::Docker.all 'dannyben/bashly', Bashly::VERSION
1415

1516
help "Run interactive console"
1617
action :console, :c do
@@ -51,32 +52,4 @@ action :examples do
5152
end
5253
end
5354

54-
command :docker
55-
56-
help "Build the docker images"
57-
action :build, :b do
58-
system "docker build -t dannyben/bashly ."
59-
system "docker tag dannyben/bashly dannyben/bashly:#{Bashly::VERSION}"
60-
system "docker images |grep bashly"
61-
end
62-
63-
help "Smoke test the docker image"
64-
action :test, :t do
65-
bashly_version = `docker run --rm dannyben/bashly --version`.chomp
66-
if bashly_version != Bashly::VERSION
67-
say "!txtred!FAIL: docker bashly version is #{bashly_version}, expected #{Bashly::VERSION}"
68-
exit 1
69-
else
70-
say "!txtgrn!PASS: docker bashly version is #{bashly_version}"
71-
end
72-
end
73-
74-
help "Push the docker images to Docker Hub"
75-
action :push, :p do
76-
system "docker push dannyben/bashly"
77-
system "docker push dannyben/bashly:#{Bashly::VERSION}"
78-
end
79-
80-
endcommand
81-
82-
require './debug.rb' if File.exist? 'debug.rb'
55+
require './debug.rb' if File.exist? 'debug.rb'

0 commit comments

Comments
 (0)