GitLabCIEnvironmentInfo.

Project Property

Summary

Gets the GitLab CI project information.

Syntax

public GitLabCIProjectInfo Project { get; }

Examples

if (BuildSystem.GitLabCI.IsRunningOnGitLabCI)
{
    Information(
        @"Project:
        Id: {0}
        Name: {1}
        Namespace: {2}
        Path: {3}
        Url: {4}
        Directory: {5}",
        BuildSystem.GitLabCI.Environment.Project.Id,
        BuildSystem.GitLabCI.Environment.Project.Name,
        BuildSystem.GitLabCI.Environment.Project.Namespace,
        BuildSystem.GitLabCI.Environment.Project.Path,
        BuildSystem.GitLabCI.Environment.Project.Url,
        BuildSystem.GitLabCI.Environment.Project.Directory
        );
}
else
{
    Information("Not running on GitLabCI");
}
Information(
    @"Project:
    Id: {0}
    Name: {1}
    Namespace: {2}
    Path: {3}
    Url: {4}
    Directory: {5}",
    GitLabCI.Environment.Project.Id,
    GitLabCI.Environment.Project.Name,
    GitLabCI.Environment.Project.Namespace,
    GitLabCI.Environment.Project.Path,
    GitLabCI.Environment.Project.Url,
    GitLabCI.Environment.Project.Directory
    );

Value

Type Description
GitLabCIProjectInfo The GitLab CI project information.