From ccf9ac0b3219317287e948762e82490bc521dc9b Mon Sep 17 00:00:00 2001 From: Michael Kuzmin Date: Tue, 6 Jan 2015 02:20:25 +0300 Subject: [PATCH] send a service message inside a TeamCity build --- lib/command.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/command.rb b/lib/command.rb index 8cff7e5..e89ac4f 100644 --- a/lib/command.rb +++ b/lib/command.rb @@ -7,7 +7,9 @@ def self.synopsis def execute with_target_vms(nil, {:single_target=>true}) do |machine| - @env.ui.info(machine.guest.capability(:read_ip_address)) + ip = machine.guest.capability(:read_ip_address) + message = ENV['TEAMCITY_VERSION'] ? "##teamcity[setParameter name='env.VAGRANT_IP' value='#{ip}']" : ip + @env.ui.info(message) end end end