From 008e3d66e9649079037260c072020340c69f3eec Mon Sep 17 00:00:00 2001 From: Standa Opichal Date: Wed, 18 Feb 2015 15:47:10 +0100 Subject: Fix for TeamCity buildQueue REST API build/@branchName. Strips the refs/heads/ if any to get just the branchName out of a :ref e.g.: `refs/heads/feature/newProfile` -> `feature/newProfile` The TeamCity buildQueue POST data require the branchName attribute to contain just the branch name (just xyzbranch and not the full ref in the refs/heads/xyzbranch). With the refs/heads/xyzbranch the build is triggered and looks like it is working however it always ompiles the default branch (or master). --- app/models/project_services/teamcity_service.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/models/project_services') diff --git a/app/models/project_services/teamcity_service.rb b/app/models/project_services/teamcity_service.rb index c4b6ef5d9a9..b6932f1c77b 100644 --- a/app/models/project_services/teamcity_service.rb +++ b/app/models/project_services/teamcity_service.rb @@ -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: ""\ -- cgit v1.2.1