Merge pull request #8812 from opichals/teamcity_branchName_not_to_be_whole_ref

Fix for TeamCity buildQueue REST API build/@branchName.
This commit is contained in:
Dmitriy Zaporozhets 2015-03-02 15:23:15 -08:00
commit 33e107127a

View file

@ -115,13 +115,13 @@ class TeamcityService < CiService
end
end
def execute(data)
def execute(push)
auth = {
username: username,
password: password,
}
branch = data[:ref]
branch = push[:ref].gsub('refs/heads/', '')
self.class.post("#{teamcity_url}/httpAuth/app/rest/buildQueue",
body: "<build branchName=\"#{branch}\">"\