Every template shall reuse defined [generic pipeline stages](../understand.md#generic-pipeline-stages).
If an additional stage seems to be required, that must be discussed with the core team first.
## Sensible defaults
Examples:
@@ -27,7 +33,7 @@ Examples:
- When introducing a new toggleable feature (e.g. a new SAST job), decide wisely whether it should be enabled by default (opt-out) or disabled by default (opt-in).
- When defining default tool CLI options, select the most appropriate options. If unsure: prefer the option that raises the bar (of code quality/best practices) rather than the conservative one
## GitLab services by default
## GitLab by default
When implementing a feature requiring an external service (ex: a packages registry)
and if GitLab provides such a service, then:
@@ -65,12 +71,6 @@ For instance it might (and it will soon) support various tools to bake the conta
- it would prevent _to be continuous_ templates from being included from another root path than `/to-be-continuous` (it may happen in some organizations when the groups hierarchy is locked by governance rules)
- should the nested include be versionned or not? both options have serious drawback (dependency hell vs. less control on impact management)
## Standard stages
Every template shall reuse defined [generic pipeline stages](../understand.md#generic-pipeline-stages).
If an additional stage seems to be required, that must be discussed with the core team first.
## Standard environments
Every infrastructure(-as-code) and deployment template shall support 4 kinds of environments (each being optional):
@@ -138,9 +138,18 @@ Examples:
## Dotenv artifacts
Propagate dynamic output variables to downstream jobs...
_to be continuous_ templates are composable. In other words they cooperate gracefully with others to minimize the amount of integration work.
It is common that a job _produces_ output that could be used by downstream jobs, possibly from other templates.
Those output can be artifacts (ex: result of a build), reports (ex: SAST tools reports consumed by the SonarQube template or DefectDojo), and sometimes
it could be a dynamic variable.
For this last need, _to be continuous_ uses the [dotenv report format](https://docs.gitlab.com/ee/ci/yaml/artifacts_reports.html#artifactsreportsdotenv) to propagate output environment variables downstream.
Examples:
TODO - TODO - TODO
- every deployment template propagates the deployed environment as a `$environment_url`, that can be used by
any acceptance testing template, whichever the deployment technology or the testing tools
- the Docker and Cloud Native Buildpack templates both propagates several variables of the built container image (container registry, full url with tag, full url with digest, tag only...) that can be used in downstream templates to use pull this image
@@ -290,7 +290,7 @@ have been developed, you'll be able to proceed with the release and _flush_ them
_to be continuous_ templates are built to be:
***Modular**: each template complies to the [Single-responsibility principle](https://en.wikipedia.org/wiki/Single-responsibility_principle) while observing common architectural principles (standard behaviour per template type, generic pipeline stages, common Git workflow principles, ...)
***Modular**: each template complies to the [Single-responsibility principle](https://en.wikipedia.org/wiki/Single-responsibility_principle) while observing [common architectural principles](./dev/architecture.md)(standard behaviour per template type, generic pipeline stages, common Git workflow principles, ...)
***Composable**: each template cooperates gracefully with others to minimize the amount of integration work.