Parameter | Required/Optional | Description |
---|---|---|
api_version | Required | A string that matches the API version this document is for. |
source_association_key | Required | A key generated by TeamForge Orchestrate that links incoming builds with the appropriate source server. |
Example: "source_association_key": "6t5qM5AuLLWLkmqFJeKp" | ||
build_data | Required | The raw build data, as provided by the build system. |
Field | Required/Optional | Description |
---|---|---|
remote_id | Required | A string to uniquely identify the build. It will appear in the UI. |
duration | Required | A string containing time (in seconds) it took for a build agent to build. |
event_time | Required | A string containing a timestamp in UTC timezone and RFC 3339 format. |
build_url | Required | A string with the URL to the build summary. Please note that the fully qualified URL with the URL scheme is required. |
created_by | Optional | A string containing the username of the person who triggered the build. |
status | Required | An object that declares the status of the build object. |
Accepted values
|
||
test_results | Optional | An object containing the test results summary. |
Accepted values
|
||
revisions | Optional | An array of objects containing the SCM revisions related to this build. |
Accepted values
|
||
event_time | Required | A string containing a timestamp in UTC timezone and RFC 3339 format. |
created_by | Required | The user name of the person who took the action. |
The following code examples are Copyright 2020 CollabNet, Inc., licensed under the Apache License, Version 2.0 (the "License"); you may not use this code except in compliance with the License. You may obtain a copy of the License at [http://www.apache.org/licenses/LICENSE-2.0]
{ "api_version": "1", "source_association_key": "29bf0c90-3b40-0130-ae2d-dddd5893", "build_data": { "remote_id": "700", "event_time": "2012-10-02T17:15:32.320Z", "duration": "200", "build_url": "http://example.com/builds/600", "created_by": "admin", "status": { "type": "SUCCESS", "name": "SUCCESSFUL" }, "test_results": { "passed_count": "10", "failed_count": "0", "ignored_count": "0", "url": "http://example.com/builds/600/tests" }, "revisions": [{ "revision": "fb849a2440dda438f4c6ab25f8c3266ed82d8797", "repository_url": "ssh://gitserver/project" }] } }
require 'amqp' QUEUE = 'orchestrate.builds' BUILD = '{ "api_version": "1", "source_association_key": "29bf0c90-3b40-0130-ae2d-dddd5893", "build_data": { "remote_id": "700", "event_time": "2012-10-02T17:15:32.320Z", "duration": "200", "build_url": "http://example.com/builds/600", "created_by": "admin", "status": { "type": "SUCCESS", "name": "SUCCESSFUL" }, "test_results": { "passed_count": "10", "failed_count": "0", "ignored_count": "0", "url": "http://example.com/builds/600/tests" }, "revisions": [{ "revision": "fb849a2440dda438f4c6ab25f8c3266ed82d8797", "repository_url": "ssh://gitserver/project" }] } }' # Event loop EventMachine.run do connection = AMQP.connect('amqp://guest:guest@example-mq') # Set up our RabbitMQ information channel = AMQP::Channel.new(connection) queue = channel.queue(QUEUE, :auto_delete => false, durable: true) exchange = channel.direct('') # Publish the build and exit the loop exchange.publish BUILD, :routing_key => queue.name do connection.disconnect {EventMachine.stop} end end