Package pipeline: single configuration¶
We will start with the most simple case, in which we only had to build 1 configuration, and that configuration can be built in the current CI machine.
As we described before while presenting the different server binary repositories, the idea is that package builds
will use by default the develop
repo only, which is considered the stable one for developer and CI jobs.
This pipeline starts from a clean state, with no packages in the cache, and only the develop
repository enabled.
With this configuration the CI job could just do:
$ cd ai
$ conan create . --build="missing:ai/*"
...
ai/1.1.0: SUPER BETTER Artificial Intelligence for aliens (Release)!
ai/1.1.0: Intelligence level=50
Note the --build="missing:ai/*"
might not be fully necessary in some cases, but it can save time in other situations.
For example, if the developer did some changes just to the repo README, and didn’t bump the version at all, Conan will not
generate a new recipe revision
, and detect this as a no-op, avoiding having to unnecessarily rebuild binaries from source.
If we are in a single-configuration scenario and it built correctly, for this simple case we don’t need a promotion,
and just uploading directly the built packages to the products
repository will be enough, where the products pipeline
will pick it later.
# We don't want to disrupt developers or CI, upload to products
$ conan remote enable products
$ conan upload "ai*" -r=products -c
$ conan remote disable products
As the cache was initially clean, all ai
packages would be the ones that were built in this pipeline.
This was a very simple scenario, let’s move to a more realistic one: having to build more than one configuration.