From bfb24e78dd5dd1c2cfbfa68368c55bf4c238f5e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20M=C3=BCller?= Date: Wed, 24 Oct 2018 14:52:43 +0200 Subject: [PATCH] Add "useGuest" to configuration at TeamCity Configuration. Use "guestAuth" endpoint in TeamCity.js when "useGuest" configuration property is enabled. --- README.md | 6 ++++-- app/services/TeamCity.js | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c7d5b21b..c9aadcf8 100644 --- a/README.md +++ b/README.md @@ -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) #### Visual Studio Team Services and Team Foundation Server diff --git a/app/services/TeamCity.js b/app/services/TeamCity.js index 5c20c7ab..7952a2ba 100644 --- a/app/services/TeamCity.js +++ b/app/services/TeamCity.js @@ -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) {