Skip to content

Commit 7592d5e

Browse files
committed
add docker test
1 parent 747d7eb commit 7592d5e

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

Runfile

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,18 @@ action :build, :b do
5151
run "docker images |grep bashly"
5252
end
5353

54-
help "Push the docker images to Docker Hub (since autobuilds are only for the rich and famous...)"
54+
help "Smoke test the docker image"
55+
action :test, :t do
56+
bashly_version = `docker run --rm dannyben/bashly --version`.chomp
57+
if bashly_version != Bashly::VERSION
58+
say "!txtred!FAIL: docker bashly version is #{bashly_version}, expected #{Bashly::VERSION}"
59+
exit 1
60+
else
61+
say "!txtgrn!PASS: docker bashly version is #{bashly_version}"
62+
end
63+
end
64+
65+
help "Push the docker images to Docker Hub"
5566
action :push, :p do
5667
run "docker push dannyben/bashly"
5768
run "docker push dannyben/bashly:#{Bashly::VERSION}"

0 commit comments

Comments
 (0)