@@ -36,13 +36,24 @@ _to be continuous_ proposes a set of GitLab CI templates developed and maintaine
## How does it work?
_to be continuous_ templates rely on the GitLab CI [`include:file` feature](https://docs.gitlab.com/ee/ci/yaml/#includefile).
Any template may be included in your `.gitlab-ci.yml` file as (for e.g.):
Any _to be continuous_ template may be [included](https://docs.gitlab.com/ee/ci/yaml/#include) in your `.gitlab-ci.yml` file using one of the 3 techniques:
*[`include:component`](https://docs.gitlab.com/ee/ci/yaml/#includecomponent) to use it as a [CI/CD component](https://docs.gitlab.com/ee/ci/components/index.html):
:information_source: _this technique might only be of interest if you want to test _to be continuous_ from your Self-Managed GitLab without installing it locally_
@@ -9,19 +9,20 @@ This page presents the general principles of use supported throughout all _to be
## Include a template
As previously said, each template may be used by [including](https://docs.gitlab.com/ee/ci/yaml/#includefile) it to your
`.gitlab-ci.yml` file.
As previously said, each template may be [included](https://docs.gitlab.com/ee/ci/yaml/#include) in your `.gitlab-ci.yml` file using one of the 3 techniques:
For example:
*[`include:component`](https://docs.gitlab.com/ee/ci/yaml/#includecomponent) to use it as a [CI/CD component](https://docs.gitlab.com/ee/ci/components/index.html),
*[`include:project`](https://docs.gitlab.com/ee/ci/yaml/#includeproject) to use it as a regular template,
* or [`include:remote`](https://docs.gitlab.com/ee/ci/yaml/#includeremote)(this technique might be interesting if you want to test _to be continuous_ from your Self-Managed GitLab without installing it locally).
For example (CI/CD component):
```yaml
include:
-project:'to-be-continuous/maven'# this is the template project
file:'/templates/gitlab-ci-maven.yml'# template file within the project
ref:'1.0.0'# template exact version
-project:'to-be-continuous/aws'
file:'/templates/gitlab-ci-aws.yml'
ref:'1.2'# use minor version alias (uses the latest available patch version)
Our templates are **versioned** (compliant with [Semantic Versioning](https://semver.org/)):
@@ -35,10 +36,38 @@ Our templates are **versioned** (compliant with [Semantic Versioning](https://se
## Configure a template
Each template comes with a predefined configuration (whenever possible), but is always overridable via [variables](https://docs.gitlab.com/ee/ci/variables/).
Each template comes with a predefined configuration (whenever possible), but is always overridable:
* with [inputs](https://docs.gitlab.com/ee/ci/components/index.html#use-a-component) if using the [`include:component`](https://docs.gitlab.com/ee/ci/yaml/#includecomponent) technique,
* or with [variables](https://docs.gitlab.com/ee/ci/variables/) if using `include:project`](https://docs.gitlab.com/ee/ci/yaml/#includeproject) or [`include:remote`](https://docs.gitlab.com/ee/ci/yaml/#includeremote).
Some template features are also enabled by defining the right variable(s).
### Use as a CI/CD component
Here is an example of a Maven project that:
1. overrides the Maven version used (with `image` input),
2. overrides the build arguments (with `build-args`),
3. enables [SonarQube](https://www.sonarqube.org/) analysis (by defining the `sonar-url` input and the `SONAR_AUTH_TOKEN` secret variable),