Update Continuous Integration and Continuous Deployment authored by Fabian Nuraddin Alexander Gabel's avatar Fabian Nuraddin Alexander Gabel
......@@ -58,8 +58,12 @@ See also [https://stackoverflow.com/a/57332478](https://stackoverflow.com/a/5733
# Pipeline
Depending on the trigger event, the GitLab [pipeline](https://docs.gitlab.com/ee/ci/pipelines/) decides which [jobs](https://docs.gitlab.com/ee/ci/jobs/) are going to be executed. Some of them perform tests, others build [artifacts](https://docs.gitlab.com/ee/ci/pipelines/job_artifacts.html#job-artifacts) that can be downloaded or viewed in the review app.
## Stages
Each job belongs to a certain stage. Jobs at later stages need the jobs of prior stages to finish successfully. Jobs at the same stage are run in parallel.
### Default
```yaml
......@@ -76,27 +80,29 @@ Overall the pipeline features 5 Stages:
![](https://writemd.rz.tuhh.de/uploads/upload_f51cd45c68f0e95122226310a9d4834d.gif)
The first two stages are testing stages:
* `docker-update`: checks, whether the docker images from the repository's [container registry](https://collaborating.tuhh.de/cfg0846/research-topics-mat-tuhh/container_registry) are available and rebuilds them if the `Dockerfile`s have changed
* [`docker-update`](): checks, whether the docker images from the repository's [container registry](https://collaborating.tuhh.de/cfg0846/research-topics-mat-tuhh/container_registry) are available and rebuilds them if the `Dockerfile`s have changed
* `testing`: performs various tests of the [preprocessor](Preprocessors) and [building]() routines
* `build`: constructs the various products like standalone webpages, and TUHH-delivery packages
* `review`: starts the review apps for the merge request
* `deploy`: ships the products to their final destination (`www3`, `www3-dev`, `mat`)
### Jobs and Artifacts
#### `docker-test` and `testing`
#### `docker-update`
Here, all [Docker](/Dependencies#docker) images are updated.
First, all [Docker]() images are tested (or built). The testing stage consists of the following functionality tests: Each time a bash-script with prefix `test_` is executed. All scripts reside in `/bin` and exit with exit code `1` if something goes wrong. In case of a failing test, subsequent states of the pipeline stall.
#### `testing
The testing stage consists of the following functionality tests: Each time a bash-script with prefix `test_` is executed. All scripts reside in `/bin` and exit with exit code `1` if something goes wrong. In case of a failing test, subsequent states of the pipeline stall.
Check the code documentation provided by the scripts for further information.
#### `build`
Here the different products are constructed. Most of them rely on the docker image:
Here, the different products are constructed. Most of them rely on the `docker` image `pandoc-bash` from the Dockerfile in `/docker/pandoc-bash.Dockerfile`. The image is stored as
collaborating.tuhh.de:5005/cfg0846/research-topics-mat-tuhh/ubuntu-pandoc
collaborating.tuhh.de:5005/cfg0846/research-topics-mat-tuhh/pandoc-bash
which can also be retrieved from docker.hub or built from the Dockerfile in `/doker/`
in the [container registry](https://collaborating.tuhh.de/cfg0846/research-topics-mat-tuhh/container_registry) but can also be retrieved from [Docker Hub](hub.docker.com) under the name [`eltenedor/pandoc-bash`](https://hub.docker.com/r/eltenedor/pandoc-bash).
The main artifacts of this stage come from the jobs
......@@ -110,8 +116,6 @@ The artifacts of the build-tuhh job are created only for runs of the master bran
![https://collaborating.tuhh.de/cfg0846/research-topics-mat-tuhh/-/jobs/artifacts/master/download?job=build-tuhh](https://img.shields.io/badge/Download-TUHH%20Build-blueviolet)
#### `review`
Runs the [review apps](https://docs.gitlab.com/ee/ci/review_apps/)
......
......