Default
Defines pipeline stages and base variables used across all pipelines.
Usage
yaml
include:
- project: hosstio/gitlab-pipelines
file: helpers/default.yamlLog helpers (.log_helpers)
POSIX sh compatible logging functions, safe to use in any image regardless of shell. Wire them in via !reference as the first item of any before_script, script, or after_script that uses them.
| Function | Behaviour |
|---|---|
log_debug "message" | Prints a dim grey [DEBUG] line to stderr |
log_info "message" | Prints a bold blue [INFO] line to stderr |
log_warning "message" | Prints an orange [WARNING] line to stderr |
log_error "message" | Prints a bold red [ERROR] line to stderr |
log_env "pattern" | Prints env vars matching the grep pattern; keys in cyan bold, values in yellow |
yaml
build:
before_script:
- !reference [.log_helpers, script]
script:
- log_info "Building $CI_PROJECT_NAME"
- log_env "^DOCKER_"For jobs that also need GitLab CI section markers or print_command, use .gitlab_section_helpers from helpers/gitlab.yaml instead; it includes .log_helpers and adds bash-only helpers on top.
Stages
quality → build → test → publish → plan → deploy → release → live → rollback → notify → agents → extra
Variables
| Variable | Default | Description |
|---|---|---|
ENVIRONMENT | $CI_ENVIRONMENT_SLUG | Current environment slug |
APP_NAME | $CI_PROJECT_TITLE | Application display name |
APP_SLUG | $CI_PROJECT_NAME | Application slug |
APP_VERSION | $CI_COMMIT_REF_SLUG | Branch slug or git tag |