teamcity-groovy-buildstep

A TeamCity plugin which adds the ability to write a build step using Groovy

OTHER License

Stars
9
Committers
3

= Groovy build step plugin for TeamCity image:https://secure.travis-ci.org/melix/teamcity-groovy-buildstep.png?branch=master["Build Status", link="https://travis-ci.org/melix/teamcity-groovy-buildstep"]

This plugin adds the ability to write build steps as Groovy script.

== Usage

Here's a screenshot of the build runner:

image::assets/groovy-teamcity.png[]

The script exposes the following variables:

  • system : system properties (type Map)
  • env : environment variables (type Map)
  • params : all build parameters (type Map)
  • configParams: configuration parameters (type Map)
  • agent: the build agent (type jetbrains.buildServer.agent.AgentRunningBuild)
  • context : the build execution context (type: jetbrains.buildServer.agent.BuildRunnerContext)
  • log: build runner logger (type: jetbrains.buildServer.agent.BuildProgressLogger)

== Logging

For messages to appear into the build log, you mustn't use println. Instead, use the build logger:

system.each { k, v ->
    log.message "System property: $k = $v"
}

== Building

To build the project, open a command line and type in:

./gradlew assembleTeamcityPlugin

== Installing

Copy the build/teamcity/teamcity-groovy-buildstep-1.0.0-SNAPSHOT.zip file into the .BuildServer/plugins directory.