module Docker::Template::Notify
Public Instance Methods
alias(builder)
click to toggle source
– Notify
the user that we are tag aliasing. –
# File lib/docker/template/notify.rb, line 24 def alias(builder) repo = builder.repo aliased_repo = builder.aliased_repo || builder.aliased_tag msg = Simple::Ansi.green("Aliasing #{repo} -> #{aliased_repo}") $stderr.puts msg end
build(repo, rootfs: false) { || ... }
click to toggle source
–
# File lib/docker/template/notify.rb, line 33 def build(repo, rootfs: false) build_start(repo, { :rootfs => rootfs }) if block_given? yield build_end(repo, { :rootfs => rootfs }) end end
build_end(repo, rootfs: false)
click to toggle source
– Notify
the user that building their repository has ended. –
# File lib/docker/template/notify.rb, line 70 def build_end(repo, rootfs: false) if ENV["TRAVIS"] && !ENV.key?("RSPEC_RUNNING") STDOUT.puts(format("travis_fold:end:%s", repo.to_s(:rootfs => rootfs).tr("^A-Za-z0-9", "-").gsub( /\-$/, "" ) )) end $stderr.puts Simple::Ansi.green(format( "Done Building: %s", repo.to_s({ :rootfs => rootfs }) )) end
build_start(repo, rootfs: false)
click to toggle source
– Notify
the user that we are building their repository. –
# File lib/docker/template/notify.rb, line 50 def build_start(repo, rootfs: false) if ENV["TRAVIS"] && !ENV.key?("RSPEC_RUNNING") STDOUT.puts(format("travis_fold:end:%s", repo.to_s(:rootfs => rootfs).tr("^A-Za-z0-9", "-").gsub( /\-$/, "" ) )) end $stderr.puts Simple::Ansi.green(format( "Building: %s", repo.to_s({ :rootfs => rootfs }) )) end
push(builder)
click to toggle source
– Notify
the user of a push that is happening. –
# File lib/docker/template/notify.rb, line 14 def push(builder) $stderr.puts Simple::Ansi.green( "Pushing: #{builder.repo}" ) end