ESBO-ETC/docs/source/developer/pipeline.rst

31 lines
2.1 KiB
ReStructuredText
Raw Permalink Normal View History

2020-08-24 15:47:20 +02:00
Each push to the `ESBO-ETC Repository <https://egit.irs.uni-stuttgart.de/esbo_ds/ESBO-ETC>`_ triggers a Jenkins CI/CD-pipeline on the ESBO-DS VM.
This pipeline first executes all unittests to ensure the prober functioning of the code. Afterwards this documentation is being built and deployed to the webroot of ESBO-DS' webserver.
All these build steps are defined within a Jenkins-file in the root of the repository. The complete CI/CD set up is shown in the following figure.
2020-08-26 15:47:27 +02:00
.. figure:: images/ci_cd_pipeline.png
2020-08-24 15:47:20 +02:00
:alt: CI/CD configuration
CI/CD configuration.
Jenkins Configuration
---------------------
In `Jenkins <http://esbo-ds.irs.uni-stuttgart.de:8080>`_ the pipeline `ESBO-ETC <http://esbo-ds.irs.uni-stuttgart.de:8080/job/ESBO-ETC/>`_ is defined and configured to read all sources including the Jenkins-file from the ESBO-ETC repository in Gitea.
Additionally, a webhook is set up and included in `Gitea <https://egit.irs.uni-stuttgart.de/esbo_ds/ESBO-ETC/settings/hooks>`_ to trigger the pipeline after each push to the repository.
After the pipeline has been triggered, Jenkins clones the repository and executes the contained Jenkins-file.
Pipeline
--------
The pipeline is divided into three steps:
1. **Test:** A docker image containing a complete python installation and a virtual environment is built using the Dockerfile in the root of the repo.
2020-08-27 09:08:40 +02:00
Afterwards all required python modules (see ``requirements.txt``) are being installed in the container and the unittests defined in ``tests`` executed.
If all tests pass, the pipeline continues with stage 2.
2020-08-24 15:47:20 +02:00
2. **Build Docs:** The documentation is being build using the previous docker image.
2020-08-27 09:08:40 +02:00
After all required python modules have been installed, the build process using sphinx is started.
The results of the build process (all website files) are archived (stashed) for the next stage of the pipeline as shown in the image above.
2020-08-24 15:47:20 +02:00
3. **Deploy Docs:** The last stage of the pipeline is run locally on the ESBO-DS VM.
2020-08-27 09:08:40 +02:00
The build results from the previous stage are unarchived and copied to the webroot of the webserver.
2020-08-24 15:47:20 +02:00