pub fn export_gitlab_ci(
session: &Session,
params: Option<&[Parameter]>,
) -> StringExpand description
Export a session as a GitLab CI configuration YAML.
Generates a .gitlab-ci.yml with:
- Metadata header comments (session name, date, command count)
- Single
buildstage and job ubuntu:22.04Docker imagevariables:block when parameters are providedcdcommands in the script array when cwd changes- Commands passed through
escape_yaml()for safe YAML output - Annotations for failed commands (non-zero exit codes)
When params is Some, a variables: block is added at job level
and commands use $VAR references.
Empty sessions produce a valid config with a placeholder script entry (GitLab CI requires at least one script entry).