Commit 6a27e01a authored by Robert Speicher's avatar Robert Speicher

Merge branch 'mr-teamcity-use-revision' into 'master'

Use revision instead of build number for TeamCity query.

See merge request gitlab-org/gitlab-ce!23898
parents 626bd9d4 df73b90a
...@@ -39,9 +39,7 @@ class TeamcityService < CiService ...@@ -39,9 +39,7 @@ class TeamcityService < CiService
end end
def help def help
'The build configuration in Teamcity must use the build format '\ 'You will want to configure monitoring of all branches so merge '\
'number %build.vcs.number% '\
'you will also want to configure monitoring of all branches so merge '\
'requests build, that setting is in the vsc root advanced settings.' 'requests build, that setting is in the vsc root advanced settings.'
end end
...@@ -70,7 +68,7 @@ class TeamcityService < CiService ...@@ -70,7 +68,7 @@ class TeamcityService < CiService
end end
def calculate_reactive_cache(sha, ref) def calculate_reactive_cache(sha, ref)
response = get_path("httpAuth/app/rest/builds/branch:unspecified:any,number:#{sha}") response = get_path("httpAuth/app/rest/builds/branch:unspecified:any,revision:#{sha}")
{ build_page: read_build_page(response), commit_status: read_commit_status(response) } { build_page: read_build_page(response), commit_status: read_commit_status(response) }
end end
......
---
title: Build number does not need to be tweaked anymore for the TeamCity integration to work properly.
merge_request: 23898
author:
type: changed
...@@ -205,7 +205,7 @@ describe TeamcityService, :use_clean_rails_memory_store_caching do ...@@ -205,7 +205,7 @@ describe TeamcityService, :use_clean_rails_memory_store_caching do
end end
def stub_request(status: 200, body: nil, build_status: 'success') def stub_request(status: 200, body: nil, build_status: 'success')
teamcity_full_url = 'http://gitlab.com/teamcity/httpAuth/app/rest/builds/branch:unspecified:any,number:123' teamcity_full_url = 'http://gitlab.com/teamcity/httpAuth/app/rest/builds/branch:unspecified:any,revision:123'
auth = %w(mic password) auth = %w(mic password)
body ||= %Q({"build":{"status":"#{build_status}","id":"666"}}) body ||= %Q({"build":{"status":"#{build_status}","id":"666"}})
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment