The role of the Continuous Integration platform is to validate the different
commits pushed to OTB repository. When commits are pushed, either on the main
repository or on a fork, the platform triggers a pipeline with several jobs to
build and test OTB on different configurations.
Depending on where your commit was pushed, different pipelines are created:
push on a feature branch -> wip pipeline
push on a feature branch with a merge request (not in WIP) -> mr pipeline
push on develop branch -> develop pipeline
push on a release branch release_X.Y -> release pipeline
The wip pipeline is the fastest, with only one build job on Linux. The mr,
develop and release pipeline are more exhaustive and build on several platforms.
The different pipeline stages are:
precheck : fast build on Linux, no test
prepare : for configuration using a XDK, update it if SuperBuild has changed
build : compile, test and package OTB on various platforms
report : analyse quality reports with SonarQube
deploy : upload generated binaries and documentation to OTB website
external : contains the links to CDash submissions
When a pipeline ends, there are two cases:
if all the jobs succeed, you see a green pipeline, which means no problem was
found on your commit.
if one job fails, you see a red pipeline, which means something is broken in
your commit. The pipeline widget on Gitlab will tell you which job failed. You
will also find special jobs "cdash:..." in the stage external that provide
a link to the Dashboard
where you can look more in details into compilation errors and failed tests.
Failed jobs can be retried if you think the failure was not bound to your commit.
Q: What about baseline files?
They are now stored in the main OTB repository, under
Data folder. You can update them with a plain commit on your feature branch.
Note that the data files are tracked with Git LFS
, so you need to install this extension.
Q: How do I get a test result back from CI?
You have a failing test and you want to analyse the output. Here is how you can do it:
First step is to check information available on the CDash report (link should be available at the end of the job logs).
If this is not enough to investigate, you can download the test output:
Find the file name of the test output (let say myOutput.tif)
Edit the file .gitlab-ci.yml and locate the job where your test fails