Usage
This guide explains how to use the Welance pipeline templates in your GitLab projects.
Overview
The Welance pipeline system uses centralized orchestration pipelines that are defined in the Welance ecosystem. These orchestration pipelines handle building and deploying applications, with the overall definition centralized for consistency and maintainability.
Setup
To use Welance pipeline templates in your GitLab repository, you need to create a .gitlab-ci.yml file in the root of your repository that references the centralized pipeline template.
Basic Configuration
Create a .gitlab-ci.yml file with the following structure:
include:
- project: 'welance/platform/pipelines/templates/pipeline/git-flow'
ref: release/1.0.0
file: 'craft.yml'
variables:
PROJECT_ID: 'p222-01'
Configuration Options
Include Block
The include block references the centralized pipeline template repository:
- project: The GitLab project path containing the pipeline template repository (
welance/platform/pipelines/templates/pipeline/git-flow) - ref: The version/release of the orchestration pipeline to use (e.g.,
release/1.0.0). This refers to a particular release of the orchestration pipeline that builds and deploys your application. - file: The specific orchestration pipeline file to use (e.g.,
craft.ymlfor Craft CMS applications). Each file represents a complete orchestration pipeline for a specific application stack.
Variables
Required variables that must be defined:
- PROJECT_ID: Your project identifier (e.g.,
p222-01)
How It Works
The pipeline system works as follows:
- Centralized Definition: All orchestration pipeline definitions are centralized in the Welance ecosystem (
welance/platform/pipelines/templates/pipeline/git-flow) - Versioned Releases: Each orchestration pipeline is versioned (via
ref), allowing you to use a specific release that defines how your application is built and deployed - Application Stack Specific: Each
filerepresents a complete orchestration pipeline for a specific application stack (e.g.,craft.ymlfor Craft CMS) - Project Configuration: Your repository only needs to reference the centralized pipeline and provide project-specific variables
Available Template Files
The git-flow pipeline template repository provides different orchestration pipeline files for different application stacks:
craft.yml- Complete orchestration pipeline for Craft CMS applications- Additional orchestration pipelines may be available for other stacks
Example
Here's a complete example for a Craft CMS project:
include:
- project: 'welance/platform/pipelines/templates/pipeline/git-flow'
ref: release/1.0.0
file: 'craft.yml'
variables:
PROJECT_ID: 'p222-01'
This configuration:
- References the centralized git-flow pipeline template repository
- Uses version
release/1.0.0of the orchestration pipeline - Selects the
craft.ymlorchestration pipeline for Craft CMS - Provides the project-specific
PROJECT_IDvariable
Notes
- The
refmust match a valid release/branch/tag in the pipeline template repository - The
filespecifies which orchestration pipeline to use for your application stack - The
PROJECT_IDvariable is used throughout the orchestration pipeline for resource naming and configuration - All build and deployment logic is centralized in the Welance ecosystem, ensuring consistency across projects