Compose pisyn-generated pipelines with existing shared GitLab CI templates.
Many organizations have existing shared CI templates (security scanning, compliance checks, base configurations). This example shows how to include them alongside pisyn-generated jobs using all four GitLab CI include: types.
IncludeLocal()— include a file from the same repository (/templates/base.yml)IncludeRemote()— include a file from any URL (https://example.com/ci.yml)IncludeProject()— include a file from another GitLab project with a specific ref (shared/templates,ci/lint.yml,main)IncludeTemplate()— include a GitLab-provided template (Auto-DevOps.gitlab-ci.yml)- Direct synthesizer call — targets GitLab CI only since includes are a GitLab-specific feature
The include: block is rendered at the top of .gitlab-ci.yml, before stages::
include:
- local: /templates/base.yml
- remote: https://example.com/ci.yml
- file: ci/lint.yml
project: shared/templates
ref: main
- template: Auto-DevOps.gitlab-ci.yml
stages:
- test
# ... jobs followgo run . # synthesizes GitLab CI onlyOutput: pisyn.out/.gitlab-ci.yml