Use the EC-TeamCity plugin to interact with the TeamCity server to do tasks such as managing agents, pools, and running builds.
Plugin Version 2.0.2.2020102201 Revised on Aug 26, 2020
Setting up the plugin configuration
Plugin configurations are sets of parameters that apply across some or all of the plugin procedures. They reduce repetition of common values, create predefined sets of parameters for end users, and store credentials securely. Each configuration has a unique name that is automatically entered in designated parameters in the procedures.
Input
-
Go to
to open the plugin manager. -
Find the EC-TeamCity row.
-
Click Configure to open the TeamCity Configurations page.
-
Click Create Configuration.
-
To enable CloudBees CD to communicate with your TeamCity server, enter the following information. Provide a unique name for the configuration, keeping in mind that you may need to create additional configurations over time.
Parameter | Description |
---|---|
Configuration Name |
Provide a unique name for the connection. |
Hostname |
Hostname of the TeamCity server |
Port |
Port which used by the TeamCity server |
Protocol |
Protocol which used by the TeamCity server. |
Login As |
Supply TeamCity account username/password. Use "guest" username and an empty password for guest access. |
Plugin procedures
Get agents
Get a list of agents
Enable agent
Enable or disable the agent.
Input
-
Go to the "Enable Agent" procedure.
-
Enter the following parameters:
Parameter | Description |
---|---|
Configuration Name |
The name of the saved configuration for accessing the TeamCity server |
Agent ID |
Agent identifier for setting the enabled state |
Enable |
The enabled state for the agent |
Comment |
Optional comment on agent status change |
Authorize agent
Set the authorization status for the agent.
Assign agent to pool
Assign agent to the pool.
Get pools
Get a list of agent pools
Get build types
Get the list of build configurations
Build
Run the build task
Input
-
Go to the "Build" procedure.
-
Enter the following parameters:
Parameter | Description |
---|---|
Configuration Name |
The name of the saved configuration for accessing the TeamCity server |
TeamCity Build ID |
The build task identifier to be launched |
Parameters |
The additional parameters for the build. Each parameter must be on a new line in the format "key=value". |
Property for resulting internal build ID |
Property name used to store the resulting internal building identifier |
Import build artifact
Import build artifact from TeamCity to the CloudBees CD repository
Input
-
Go to the "Import Build Artifact" procedure.
-
Enter the following parameters:
Parameter | Description |
---|---|
Configuration Name |
The name of the saved configuration for accessing the TeamCity server |
Internal Build ID |
The internal building identifier of successfully completed build |
Repository Name |
The name of the repository into which the artifact will be published |
Artifact Group |
The group of the published artifact |
Artifact Key |
The key of the published artifact |
Artifact Version |
The version of the published artifact |
Get build log
Get a log of the completed build
Release notes
EC-TeamCity 2.0.1
-
Added support for the CSRF protection.
-
Procedure "Build" saves additional build properties: buildUrl, buildStatus, buildState.
-
Upgraded plugin configuration management.
EC-TeamCity 1.2.9
-
Added the possibility of guest access to the TeamCity server
-
Added protocol selection for access to the TeamCity server (HTTP/HTTPS)
EC-TeamCity 1.2.8
-
Fixed an error in the name of the procedure parameters
-
Added procedure "Get Build Log"
-
The procedure "Build" returns the build identifier regardless of the status of the completed task
EC-TeamCity 1.2.7
-
Fixed the procedure definition in pipeline interface
-
Added default settings for procedures "Build" and "Import Build Artifact"
-
Corrected labels for the parameters of procedures