docs(Stage): Add generell information about the stages of our architecture and the architecture of Docker Containers.

This commit is contained in:
Marcel Feix 2022-06-20 19:33:06 +02:00
parent 11a6ff9789
commit b5121b966b
No known key found for this signature in database
GPG Key ID: 04D016E104A25F03
5 changed files with 67 additions and 8 deletions

View File

@ -1,3 +1,4 @@
[[_container_build]]
= Build
.Provided Templates:
@ -13,7 +14,7 @@ We use Kaniko because it is faster than Docker builds and has less security prob
The generated image will be passed as a Tar-Artefact between stages.
This allows us to make forder manipulations and scan jobs on one container Image.
The template <<_container_publish>> allows you to publish the build image to a registry
The template <<_container_publish>> allows you to publish the build image to a registry.
.Variables
|===

View File

@ -1,5 +1,5 @@
[#_container_publish]
= Container Publish
= Publish
Moves a container from the filesystem to a remote repository.
Needs a build container on the path `image.tar`. Use one of the Container build templates for this.

View File

@ -1,7 +1,8 @@
= Docker in Docker
= Docker in Docker Helper
This template helps to start jobs, that need a docker environment to run.
Simply expand from this Template.
You than have access to a Docker over the address behind `$DOCKER_HOST`
:template: container/docker-in-docker.gitlab-ci.yml
include::../../../template-printer.adoc[]

View File

@ -49,20 +49,42 @@ include::chapters/templates/IaC/ansible.adoc[leveloffset=2]
include::chapters/templates/IaC/docker-compose.adoc[leveloffset=2]
include::chapters/templates/IaC/ssh-transfer-data.adoc[leveloffset=2]
== Container Templates
Our collection of Container Templates.
We have optimised building container within our templates a lot.
We found divide building and releasing containers into different jobs to be the fastest way to build container artefacts.
Because you can build your container while executing other verify stages.
Publishing containers is a very cheap operation.
The following graph charts shows thru which stages containers will go and which artefakts will be passed between stages.
[mermaid]
....
flowchart LR
subgraph Build Stage
build_src(Source Code Build) -- Needs Source artefacts --> build_c
build_c(Container-Build)
end
subgraph Verify Stage
build_c -- image.tar --> cve(Scan CVEs)
end
subgraph Release Stage
cve -- image.tar / Scanned --> Publish
end
Publish -- image --> Registry
....
include::chapters/templates/container/container-build.adoc[leveloffset=2]
include::chapters/templates/container/container-publish.adoc[leveloffset=2]
include::chapters/templates/container/container-scan.adoc[leveloffset=2]
== Releasing Templates
The following Templates provide an simpler integration into the https://gitlab.exxcellent.de/gilden/ci/exxcellent-increase-version-tool[Increase-Version-Tool] of the CI-Gilde.
We also provide finished Pipelines in our <<_pipelines>> section. We highly recommend using those Pipelines since this is our reference Implementation.
We also provide finished Pipelines in our <<_pipelines>> section.
We highly recommend using those Pipelines since this is our reference Implementation.
include::chapters/templates/releasing/push-tag-and-version-template.adoc[leveloffset=3]
include::chapters/templates/releasing/set-version-template.adoc[leveloffset=3]

View File

@ -1,6 +1,41 @@
:sourcedir: ../../../../templates
== Templates and Pipelines
== High Level Architektur.
The entire architektur of the templates build on the following five stages.
they are assumed to be in the following order but don't have to be.
[mermaid]
....
flowchart LR
Start --> dep(Dependencies)
dep --> build(Build)
build --> verify(Verfiy)
verify --> docs(Documentation)
docs --> Release
....
=== Dependencies - dependencies
Jobs within this stage are loading all needed Dependencies. This is done for better cache management of Dependencies.
=== Build - build
Jobs within this stage, build all needed artefacts that you need in later stages and for releasing.
In case you need to build multiple artefacts execute following jobs as soon as needed artefacts are build.
Look into Gitlabs https://docs.gitlab.com/ee/ci/yaml/#needs[Needs Documentation].
=== Verify - verify
Jobs within this stage verify your repository functionality.
This is the biggest stage, within most continues integrations.
Verify and Test as much as you can in these Jobs.
=== Documentation - docs
Jobs within this stage build and publish your documentation.
=== Release - release
Jobs within this stage publish your artefacts or automate creating Tags.
For more information look into <<_pipeline_release>>
== About Templates and Pipelines
Within this Repository all CI Templates and CI Pipeline-Templates of the CI-Gilde can be found.
Templates are predefined Jobs.