Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
06137079
Commit
06137079
authored
Jan 05, 2016
by
Charles May
Committed by
Rémy Coutable
Apr 12, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a bug with trailing slash in teamcity_url
See
https://gitlab.com/gitlab-org/gitlab-ce/issues/3515
parent
4087bd16
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
13 deletions
+21
-13
CHANGELOG
CHANGELOG
+3
-0
app/models/project_services/teamcity_service.rb
app/models/project_services/teamcity_service.rb
+18
-13
No files found.
CHANGELOG
View file @
06137079
...
...
@@ -123,6 +123,9 @@ v 8.6.0
- Add information about `image` and `services` field at `job` level in the `.gitlab-ci.yml` documentation (Pat Turner)
- HTTP error pages work independently from location and config (Artem Sidorenko)
- Update `omniauth-saml` to 1.5.0 to allow for custom response attributes to be set
- Fix avatar stretching by providing a cropping feature (Johann Pardanaud)
- Fix a bug whith trailing slash in teamcity_url (Charles May)
- Don't load all of GitLab in mail_room
- Memoize @group in Admin::GroupsController (Yatish Mehta)
- Indicate how much an MR diverged from the target branch (Pierre de La Morinerie)
- Added omniauth-auth0 Gem (Daniel Carraro)
...
...
app/models/project_services/teamcity_service.rb
View file @
06137079
...
...
@@ -85,13 +85,15 @@ class TeamcityService < CiService
end
def
build_info
(
sha
)
url
=
URI
.
parse
(
"
#{
teamcity_url
}
/httpAuth/app/rest/builds/"
\
"branch:unspecified:any,number:
#{
sha
}
"
)
url
=
URI
.
join
(
teamcity_url
,
"/httpAuth/app/rest/builds/branch:unspecified:any,number:
#{
sha
}
"
).
to_s
auth
=
{
username:
username
,
password:
password
,
}
@response
=
HTTParty
.
get
(
"
#{
url
}
"
,
verify:
false
,
basic_auth:
auth
)
@response
=
HTTParty
.
get
(
url
,
verify:
false
,
basic_auth:
auth
)
end
def
build_page
(
sha
,
ref
)
...
...
@@ -100,12 +102,14 @@ class TeamcityService < CiService
if
@response
.
code
!=
200
# If actual build link can't be determined,
# send user to build summary page.
"
#{
teamcity_url
}
/viewLog.html?buildTypeId=
#{
build_type
}
"
URI
.
join
(
teamcity_url
,
"/viewLog.html?buildTypeId=
#{
build_type
}
"
).
to_s
else
# If actual build link is available, go to build result page.
built_id
=
@response
[
'build'
][
'id'
]
"
#{
teamcity_url
}
/viewLog.html?buildId=
#{
built_id
}
"
\
"&buildTypeId=
#{
build_type
}
"
URI
.
join
(
teamcity_url
,
"
#{
teamcity_url
}
/viewLog.html?buildId=
#{
built_id
}
&buildTypeId=
#{
build_type
}
"
).
to_s
end
end
...
...
@@ -140,7 +144,8 @@ class TeamcityService < CiService
branch
=
Gitlab
::
Git
.
ref_name
(
data
[
:ref
])
self
.
class
.
post
(
"
#{
teamcity_url
}
/httpAuth/app/rest/buildQueue"
,
self
.
class
.
post
(
URI
.
join
(
teamcity_url
,
"/httpAuth/app/rest/buildQueue"
).
to_s
,
body:
"<build branchName=
\"
#{
branch
}
\"
>"
\
"<buildType id=
\"
#{
build_type
}
\"
/>"
\
'</build>'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment