Build Server Integration
A build server integration helps you reduce the amount of duplicated effort that is performed by your development teams. An integration between YouTrack and a build server enables useful features in both applications:
YouTrack pulls build numbers from connected projects. Issues that were resolved after the last known successful build are automatically assigned the build number of the next successful build. This value is added to a custom field that stores the build number for each resolved issue. YouTrack also adds an icon next to each build number that is stored in the custom field. Users can click this icon to open the build that includes the changes that resolved the issue.
You can specify whether issues that are mentioned in commit messages and build comments are assigned build numbers and use a search query to assign build numbers to issues that match specific criteria.
Your developers can reference an issue ID in the comments when they commit updates to the code repository. The build server integration adds a direct link to the YouTrack issue in the change details.
The comment is automatically added to the list of changes in the activity stream for the issue in YouTrack. Each VCS change includes a direct link to the change details in TeamCity.
Your developers can enter commands in the comments for their commits to the repository. When the build server assembles a build that contains the commit message, the command is applied all of the issues that are referenced in the comment. Developers can use this feature to update the status or add comments to one or more issues without even opening YouTrack.
Build Server Integration Settings
You can access the Build Server Integration Settings page from the Integrations section of the Administration menu.
This page displays a list of build servers that are integrated with YouTrack. The table shows the name of each integrated project, a link to the connected build, and the number of the last processed build.
The following controls are available on this page:
Pull fresh data
Sets the interval for pulling fresh data from all connected build servers. For more information, see Set the Schedule for Pulling Data from Build Servers.
Add New Mapping
Opens the Create Mapping dialog in the sidebar. Use these settings to map a YouTrack project to a build configuration.
Pulls fresh data from the build server for the selected project. Links to builds are added to issues in YouTrack that are mentioned in build comments and commit messages. Commands in VCS commit messages are applied to the corresponding issues. Build numbers are added to issues according to the options that are defined in the mapping. The last processed build is updated in the corresponding column on the integration settings page.
Opens the settings dialog for the selected build server or mapping in the sidebar.
Deletes the selected build server or mapping from YouTrack.
Removes the IDs of the last recorded change and processed build from the selected project mapping. The next time the integration is scheduled to update, YouTrack pulls the entire change and build history from the build server. Changes and builds that already exist in YouTrack are not affected.
Disables the integration in the selected build server or project. Use this option at the project level to disable integration features on a per-project basis. If the integration is disabled, the Enable option is available.
Add New Build Server
Opens a dialog in the sidebar that lets you define a connection with a new build server.
Set the Schedule for Pulling Data from Build Servers
YouTrack pulls data from connected build servers according to a schedule. The default interval is 10 minutes. You can change the schedule to a predefined interval or specify a custom interval with a cron expression. You cannot set the schedule independently for multiple build servers servers. The same schedule is applied to all build servers that are integrated with YouTrack.
To specify an interval for pulling data:
In the Integrations section of the Administration menu, select Build Server Integration.
From the Pull fresh data drop-down menu, select a pre-configured time interval. To specify another time interval, select Custom and enter a cron expression. For example, to pull fresh data every 45 minutes, every day, use the following expression:0 0/45 * * * ?
The shortest possible interval for YouTrack InCloud instances is 10 minutes. If you specify a shorter custom interval, fresh data is still pulled from the server every 10 minutes.
For details about cron expressions format, please refer to the cron trigger tutorial.