Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2019-01-10 19:34:49 +0300
committerRobert Speicher <rspeicher@gmail.com>2019-01-10 19:34:49 +0300
commit6a27e01abd6079dd616df29f86707891b0cfe15b (patch)
tree6fce9bf3ec65a3d7e50162bdf9cdd9cba9395f43
parent626bd9d4cca652f2f21d2aba8d76e1959ffacda0 (diff)
parentdf73b90a4330dff7d7cacf22fc67198490d9611a (diff)
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
-rw-r--r--app/models/project_services/teamcity_service.rb6
-rw-r--r--changelogs/unreleased/55495-teamcity-use-revision-in-query.yml5
-rw-r--r--spec/models/project_services/teamcity_service_spec.rb2
3 files changed, 8 insertions, 5 deletions
diff --git a/app/models/project_services/teamcity_service.rb b/app/models/project_services/teamcity_service.rb
index b8e17087db5..3245cd22e73 100644
--- a/app/models/project_services/teamcity_service.rb
+++ b/app/models/project_services/teamcity_service.rb
@@ -39,9 +39,7 @@ class TeamcityService < CiService
end
def help
- 'The build configuration in Teamcity must use the build format '\
- 'number %build.vcs.number% '\
- 'you will also want to configure monitoring of all branches so merge '\
+ 'You will want to configure monitoring of all branches so merge '\
'requests build, that setting is in the vsc root advanced settings.'
end
@@ -70,7 +68,7 @@ class TeamcityService < CiService
end
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) }
end
diff --git a/changelogs/unreleased/55495-teamcity-use-revision-in-query.yml b/changelogs/unreleased/55495-teamcity-use-revision-in-query.yml
new file mode 100644
index 00000000000..724de733b7c
--- /dev/null
+++ b/changelogs/unreleased/55495-teamcity-use-revision-in-query.yml
@@ -0,0 +1,5 @@
+---
+title: Build number does not need to be tweaked anymore for the TeamCity integration to work properly.
+merge_request: 23898
+author:
+type: changed
diff --git a/spec/models/project_services/teamcity_service_spec.rb b/spec/models/project_services/teamcity_service_spec.rb
index 43a0ed99296..64b4efca43a 100644
--- a/spec/models/project_services/teamcity_service_spec.rb
+++ b/spec/models/project_services/teamcity_service_spec.rb
@@ -205,7 +205,7 @@ describe TeamcityService, :use_clean_rails_memory_store_caching do
end
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)
body ||= %Q({"build":{"status":"#{build_status}","id":"666"}})