Help documentation

Go integration

Getting information in your build scripts

Go sets some standard environment variables that you can use in your build scripts. For more information see setting environment variables

RESTful API

Files in the artifact repository and properties can be created and accessed through a simple web API. You can point your browser at the URLs we give here. Most build tools like ant, nant and rake have tasks for accessing http URIs. You could use the free open-source tool cURL which is available on most operating systems.

Uploading and downloading files

Files can be downloaded from the artifact repository using a URL that follows the following pattern:

http://[Go server host]:8153/go/files/[pipeline name]/[pipelinecounter]/[stage name]/[stage label]/[job name]/[Path to file]

So for example on the page below:

you would download framework.zip with the following URL if the label template of the pipeline is using ${COUNT}:

http://[Go server host]:8153/go/files/framework/1154/dist/1/binaries/pkg/framework.zip

Instead of an actual pipeline counter, there is a "special" label you can use: latest .

  • latest gives you artifacts from the most recently scheduled job, whether it is scheduled, building, passed or failed.

Creating properties and retrieving their value

You can get properties using the following URL (note that copying and pasting the text present at the place highlighted in red above gets you part of the URL here if ${COUNT} is in the pipeline label template):

http://[Go server host]:8153/go/properties/[pipeline name]/[pipelinecounter]/[stage name]/[stage Counter]/[job name]

Using RESTful APIs with authentication

If you have authentication turned on, access to the RESTful URLs will be restricted in exactly the same way as any other page on the application. If you're using a script, it's not very helpful to be redirected to a log in page. Instead, you can use HTTP Basic authentication to supply valid credentials to Go.

You can get properties in CSV formant using the following CURL command:

curl -u [username]:[password] http://[Go server host]:8153/go/properties/[pipeline name]/[pipelinecounter]/[stage name]/[stage counter]/[job name]

Integrating artifacts in tabs

Go allows you to create a new tab containing any artifact that your browser can display. This might include html or text pages, images or even PDF and video files.

Go embeds the artifact in an IFrame, so even html pages with frameset navigation work well. The following shows an example of a JUnit test report embedded into a tab in Go:

<tabs>  
  <tab name="Test_Overview" path="/test-reports/html/index.html" />  
</tabs>

This creates a Test_Overview tab in the job details page:

Integration with bug tracking and story management tools

Go allows you to link your commit messages with bug tracking and story management tools which are web applications.

The following shows an example of tracking cards on Mingle by card numbers starting with a "#" (e.g: #4618):

Configure tracking tool

The pattern has an extra "#" because it is an escape character for a parameter. More information...

For power users, here's how you'd do it from Source XML:

<pipeline name="mypipeline">  
  <trackingtool link="http://mingle.thoughtworks.com/go/${ID}" regex="##(\d+)"/>  
  ...
</pipeline>

Now, when a user commits code with comments like "#4618 - Make sure the TrackingToolConfig and...", Go detects the modifications and automatically links story/bug numbers to the configured tracking tool:

Monitoring your builds with client tools

Go allows you to monitor your builds with CCTray through the url 'http://[your_go_server]:8153/go/cctray.xml.

If you have switched on security in your configuration you can use BASIC authentication to connect. In many cases you can do this by including the username and password in the URL. The username and password should not include special characters.

For example:

http://[username]:[password]@[your_go_server]:8153/go/cctray.xml