Skip to content

Commit

Permalink
Merge pull request #142 from Alea81/feature/teamcity_unauthorized
Browse files Browse the repository at this point in the history
Add "useGuest" to configuration at TeamCity Configuration.
  • Loading branch information
marcells authored Oct 24, 2018
2 parents 954f9e6 + bfb24e7 commit 8ac34e9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,19 +160,21 @@ Supports the [TeamCity](https://www.jetbrains.com/teamcity/) build service.
"branch": "master",
"authentication": "ntlm",
"username": "teamcity_username",
"password": "teamcity_password"
"password": "teamcity_password",
"useGuest": true
}
}
```

| Setting | Description
|-------------------------|-----------------------------------------------------------------------------------------
| `url` | The url to the TeamCity server (including the credentials without a trailing backslash).
| `url` | The url to the TeamCity server (including the credentials without a trailing backslash, if not the guest user is used).
| `buildConfigurationId` | The id of the TeamCity build configuration
| `branch` | The name of branch that needs to be monitored. Will monitor all branches if not specified.
| `authentication` | This option is only required if using 'ntlm' other option have no meaning
| `username` | Your TeamCity user name (if required)
| `password` | Your TeamCity password (if required)
| `useGuest` | Uses the guest user (if required)

#### Azure DevOps and Team Foundation Server Builds

Expand Down
3 changes: 2 additions & 1 deletion app/services/TeamCity.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ module.exports = function () {
},
getBuildsUrl = function(status) {
var url = self.configuration.url +
'/httpAuth/app/rest/buildTypes/id:' + self.configuration.buildConfigurationId +
(self.configuration.useGuest === true ? '/guestAuth' : '/httpAuth') +
'/app/rest/buildTypes/id:' + self.configuration.buildConfigurationId +
'/builds';
var locators = [];
if(self.configuration.branch) {
Expand Down

0 comments on commit 8ac34e9

Please sign in to comment.