Skip to content

TeamCity CI Integration

Colin Snover edited this page Jun 24, 2014 · 2 revisions

Intern is designed to easily integrate with the TeamCity continuous integration service. There are two primary ways that Intern can be integrated with a TeamCity project: either by adding a new build configuration that is chained using a post-build trigger, or by adding additional build steps to an existing build configuration. A change to your Intern configuration to use the teamcity reporter is also recommended for maximum integration.

Intern as an additional build step

  1. Go to the project that you want to add Intern to and click “Edit Project Settings” at the top-right.
  2. In the left-hand menu, click “General Settings”.
  3. Under “Build Configurations”, click “Edit” on the existing build configuration you want to add Intern to.
  4. In the left-hand menu, click “Build Steps”.
  5. Click “Add build step”.
  6. Select “Command Line” from the “Runner type” drop-down.
  7. Enter a name like “Run Intern” as the step name.
  8. Select “Custom Script” from the “Run” drop-down.
  9. Under “Custom script”, enter the command you want to use to run Intern. See the Running Intern section for possible commands.
  10. Click “Save”.

Intern as a separate build configuration

  1. Go to the project that you want to add Intern to and click “Edit Project Settings” at the top-right.
  2. In the left-hand menu, click “General Settings”.
  3. Under “Build Configurations”, click “Create build configuration”.
  4. Enter a name like “Intern” as the build configuration name.
  5. Click “Save”.
  6. In the left-hand menu, click “Build Steps”.
  7. Click “Add build step”.
  8. Select “Command Line” from the “Runner type” drop-down.
  9. Enter a name like “Run Intern” as the step name.
  10. Select “Custom Script” from the “Run” drop-down.
  11. Under “Custom script”, enter the command you want to use to run Intern. See the Running Intern section for possible commands.
  12. Click “Save”.
  13. Go back to the settings page for the project.
  14. In the left-hand menu, click “General Settings”.
  15. Click “Edit” on the build configuration you want to trigger Intern from.
  16. In the left-hand menu, click “Triggers”.
  17. Click “Add new trigger”.
  18. Choose “Finish Build Trigger” from the drop-down.
  19. Under “Build configuration”, choose the Intern build configuration that was just created.
  20. Check “Trigger after successful build only”.
  21. Click “Save”.

Intern configuration

For best integration with TeamCity, Intern comes with a special reporter that outputs data in TeamCity format. To activate this reporter, you can either add reporters=teamcity to the command you use to run Intern, or you can put reporters: [ 'teamcity' ] in your Intern configuration file.