47 lines
1.3 KiB
Plaintext
47 lines
1.3 KiB
Plaintext
:sourcedir: ../../../../templates
|
|
|
|
= Build
|
|
|
|
.Provided Templates:
|
|
|===
|
|
|Name |Description
|
|
| .container-build-jib-maven | Baut Container mit dem Jib Plugin für Maven
|
|
| .container-build-jib-gradle | Baut Container mit dem Jib Plugin für Gradle
|
|
| .container-build-kaniko | Baut Container mit dem Kaniko
|
|
|===
|
|
|
|
Allows the simple building of Container Images.
|
|
We use Kaniko because it is faster than Docker builds and has less security problems.
|
|
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
|
|
|
|
.Variables
|
|
|===
|
|
|Name |Description | Default Value
|
|
|
|
|CONTEXT_LOCATION
|
|
| Defines the context of the container build. In case of jib this Path should point to the location of your Gradle/Maven projects.
|
|
| $CI_PROJECT_DIR
|
|
|
|
| EXTRA_ARGS
|
|
| Additional argument that will be passed to the used tool.
|
|
| ""
|
|
|
|
| Only with Kaniko |- |-
|
|
|
|
| DOCKERFILE_LOCATION
|
|
| Path to the Dockerfile
|
|
| $CI_PROJECT_DIR/Dockerfile
|
|
|
|
| REGISTRY_MIRROR
|
|
| Define the container Mirror that should be used
|
|
| exxcellent Nexus
|
|
|===
|
|
|
|
.Container Build Templates
|
|
[source,yaml]
|
|
----
|
|
include::{sourcedir}/container/container-build.gitlab-ci.yml[]
|
|
---- |