Skip to content

tcWebHooksPlugin 1.2.0-alpha.4

Pre-release
Pre-release
Compare
Choose a tag to compare
@netwolfuk netwolfuk released this 18 Mar 09:31
· 359 commits to master since this release

The fourth alpha release of 1.2.0 version

This release fixes a few bugs, and adds some new features toward the tcWebHooks 1.2.x release milestone.
Note: No longer tested against TeamCity 9. Now compiled against TeamCity 10.0 libraries.

Adds support for associating WebHook templates with Projects

This allows a WebHook Template to be created and associated with a project rather then just _Root.
Now group admins can create templates for use with their own webhooks. Previously only System Admins could create/edit templates.
This addresses issue #131

Adds VelocityJsonTool which provides reading a JSON map into a Velocity Hash
Used like $jsonTool.jsonToMap($jsonString)) where $jsonString is a map formatted as JSON
For example...

## Define macro called "resolveSlackUid"
## If username not found in parameter slackMapping, then just return the username from the commit
#macro( resolveSlackUid $myUserName)
#set ($uidMap = $jsonTool.jsonToMap($slackMapping))
#if( $uidMap.get($myUserName) )<@$uidMap.get($myUserName)>#else<@$myUserName>#end
#end

Add links from webhooks search to webhooks history and vice versa

Allows linking from a webhook search result to the invocations of that
hook in the history page.

Also, allows finding the webhook config item from a history item.

Add change count variables to template UI.

Added the following new variables so that they can be selected when editing a template.

  • "changeFileListCount"
  • "maxChangeFileListSize"
  • "maxChangeFileListCountExceeded"

The following patches from the 1.1.x.x branch were also applied.

Reduce logging noise from WebHook components #153

Some TeamCity pages had protected constructors - they have now been made public. This reduces complaints (WARN) in the teamcity-server.log from Spring when TeamCity starts up.

Lots of other noisy logging messages reduced from INFO to DEBUG.

Fixes issue #152 where template editing would fail if TeamCity was installed in a non-standard web-application context.

For example: If the Teamcity application is at http://teamcity-server:8111/teamcity/ rather than http://teamcity-server:8111/ (which is the default), then the REST API call to update the template was calculated incorrectly, and requests would fail with a 404 error.

Limit the number of files listed in a changeset files value to 100 or less (by default). #150 #149
When tcWebHooks processes the build object to create the payload for a webhook, it generates a changes object which contains an array of the changed files relevant to the build. This set of files can be expensive to generate and has a performance impact for large changesets. It also bloats the webhook payload.

For changesets containing more then 100 changed files across all changes contributing to a build, the files array is now null and is typically excluded from the payload. This value can be changed if that doesn't suit. Typical values would be:

  • 100. The default count for files in a change.
  • 1000. Larger file sets, but not unlimited.
  • 0. Never show the files list.
  • -1. Unlimited. This restores the old behaviour, and can be a performance issue.

For more information, or to control the values, see: https://github.com/tcplugins/tcWebHooks/wiki/Specifying-the-maximum-files-listed-in-a-change-set