Cake.GitLabAPICI
by absolutebandit
A cake addin for running GitLab pipelines and jobs via the GitLab API
The GitLabCI alias, which returns an IGitLabCIProvider instance can be used to interact with the GitLab CI/CD environment.
The following example prints the build number if running on GitLab CI/CD:
if (BuildSystem.GitLabCI.IsRunningOnGitLabCI)
{
Information(BuildSystem.GitLabCI.Environment.Build.Id);
}
else
{
Information("Not running on GitLab CI/CD");
}
See IGitLabCIProvider for details and available methods to interact with GitLab CI/CD.