This plugin provides a TeamCity build configuration runner (a build step) for creating Conan artifacts in the local Conan cache.
This Conan plugin makes it dead-simple to create Conan artifacts in the agent's local Conan cache. Sane defaults are used wherever possible, while still providing a variety of advanced features for more complex scenarios.
For projects that need to be built with a multiple different settings/options combinations, support for a file named
conanopts.json
is provided. This file can be used to define a list of builds, each with different settings/options
used, and the Conan plugin will invoke conan create ...
for each different combination. Support for a CSV file
defining the same information is coming soon.
Optionally, Conan can be invoked from within a Docker image of your choice. The UI for configuring the Docker container was shamelessly pulled from JetBrain's own Docker plugin, and all the same features are (should be) available.
This sample build configuration assumes the following:
- The Conan home directory (importantly, the Conan cache, Conan database/credentials, and remote repository listing) is located on the TeamCity agent's host filesystem.
- When the Conan plugin makes use of Docker, the Conan cache is bound inside the Docker container, allowing for use by later build steps in the same configuration or other projects on the same agent.
- A separate
conan upload ...
step would normally be the last step of this build configuration, but was left off during testing and is therefore not in the screenshots.
To begin with, we have a simple build configuration that contains three steps:
- The Conan remote repository list is configured to include any custom repositories needed, allowing the following build steps to pull any private dependencies.
- The project is built for the TeamCity agent's native architecture.
- The project is built for TI's Sitara family of ARM processors.
(Again, a fourth step would usually need to be included, to upload the resulting artifacts, but was left off during the testing of this plugin.)
The simplest configuration is, indeed, quite simple. Provideq the user and channel for the
conan create . <user>/<channel>
command, and the rest is figured out automatically.
If needed, numerous advanced options are available, including defining a specific path to Conan (in case there are multiple versions installed) or the Conan recipe.
And finally, an example of using Docker with the Conan plugin. This UI should look happily familiar to anyone that has grown accustomed to JetBrain's own Docker integration, as documented here.