GitHunt
ET

etiennestuder/gradle-build-scan-teamcity-plugin

Gradle plugin for build scans that notifies TeamCity when a build scan is published during a build.

gradle-build-scan-teamcity-plugin

This plugin is no longer maintained. The functionality is available in the TeamCity Build Scan plugin.

The work on this software project is in no way associated with my employer nor with the role I'm having at my employer. Any requests for changes will be decided upon exclusively by myself based on my personal preferences. I maintain this project as much or as little as my spare time permits.

Overview

Gradle plugin that notifies TeamCity when
a build scan is published during a build. The plugin works in collaboration with
the Build scan TeamCity integration.

Build scans are available as a free service on scans.gradle.com and
commercially via Gradle Enterprise.

The plugin is hosted at the Gradle Plugin Portal.

Build scan

Recent build scan: https://scans.gradle.com/s/j56egl3btxzsq

Find out more about build scans for Gradle and Maven at https://scans.gradle.com.

Goals

When not using TeamCity's GradleRunner to launch Gradle builds, this plugin can be used to notify TeamCity about the build scans that were published while
running a build. If you use the GradleRunner to launch Gradle builds, there is no need to apply the plugin to your builds.

Functionality

The plugin sends a service message that contains the published build scan URLs to TeamCity via Gradle's logging infrastructure. The service
message is only interpreted by TeamCity if the Build scan TeamCity integration is enabled
on the TeamCity server.

Design

The service message sent via Gradle's logging infrastructure follows the message pattern expected by TeamCity which is ##teamcity[message-name 'arguments'].

Configuration

Applying the plugin

Project-application

For Gradle versions < 6.0, apply the nu.studer.build-scan.teamcity plugin (and the com.gradle.build-scan plugin) to your Gradle project.

plugins {
  id 'nu.studer.build-scan.teamcity' version '1.1'
  id 'com.gradle.build-scan' version '3.6.3'
}

Settings-application

For Gradle versions >= 6.0, apply the nu.studer.build-scan.teamcity plugin (and the com.gradle.enterprise plugin) to your Gradle settings file.

plugins {
  id 'nu.studer.build-scan.teamcity' version '1.1'
  id 'com.gradle.enterprise' version '3.15.1'
}

Feedback and Contributions

Both feedback and contributions are very welcome.

Acknowledgements

  • facewindu (pr for Gradle Enterprise plugin integration)
  • guylabs (pr for Gradle Enterprise plugin integration)
  • mark-vieira (pr that provides message service functionality)

License

This plugin is available under the Apache License, Version 2.0.

(c) by Etienne Studer

etiennestuder/gradle-build-scan-teamcity-plugin | GitHunt