GitLabAliases.

GitLabTryGetCurrentServerIdentity(ICakeContext) Method

Summary

Attempts to determine the ServerIdentity from environment variables.
Assembly
Cake.GitLab.dll
Namespace
Cake.GitLab
Containing Type
GitLabAliases

Syntax

public static ServerIdentity GitLabTryGetCurrentServerIdentity(this ICakeContext context)

Remarks

This alias attempts to determine the current ServerIdentity from the environment variables set by GitLab CI. Thus, this alias will only work if the build is running inside a GitLab CI pipeline.

Attributes

Type Description
NullableContextAttribute
CakeMethodAliasAttribute
CakeAliasCategoryAttribute

Parameters

Name Type Description
context ICakeContext The current context

Return Value

Type Description
ServerIdentity Returns a ServerIdentity if it could be determined or null if the server identity could not be determined.

See Also