Skip to content

Add property for GitLab's "Pipeline Source" to GitLabCIBuildInfo #4431

@ap0llo

Description

@ap0llo

Prerequisites

  • I have written a descriptive issue title
  • I have searched issues to ensure it has not already been reported

Cake runner

Cake .NET Tool, Cake Frosting

Cake version

5.0

Operating system

Linux, Windows, macOS, FreeBSD

Operating system architecture

x64

CI Server

GitLab CI

What are you seeing?

GitLab CI provides the variable CI_PIPELINE_SOURCE (see https://docs.gitlab.com/ee/ci/jobs/job_rules.html#ci_pipeline_source-predefined-variable) that indicates the trigger for a GitLab CI pipeline.

This is currently not exposed in Cake's GitLabCIBuildInfo

What is expected?

For writing build scripts, that execute some steps based on the trigger of a pipeline (e.g. execute a step only for manually started pipelines), it would be useful to have this information available in GitLabCIBuildInfo.

Since the "source" can only have a finite amount of values, I propose to model it as an enum in Cake to make it easier to program against.

Steps to Reproduce

N/A

Output log

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions