Package pl.project13.core.cibuild
Class AzureDevOpsBuildServerData
- java.lang.Object
-
- pl.project13.core.cibuild.BuildServerDataProvider
-
- pl.project13.core.cibuild.AzureDevOpsBuildServerData
-
public class AzureDevOpsBuildServerData extends BuildServerDataProvider
-
-
Field Summary
-
Fields inherited from class pl.project13.core.cibuild.BuildServerDataProvider
BRANCH_REF_PREFIX, PULL_REQUEST_REF_PREFIX, TAG_REF_PREFIX
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetBuildBranch()Attempts to extract the branch name from the Build.SourceBranch The branch of the triggering repo the build was queued for.static booleanisActiveServer(java.util.Map<java.lang.String,java.lang.String> env)-
Methods inherited from class pl.project13.core.cibuild.BuildServerDataProvider
getBuildServerProvider, loadBuildData, maybePut, setAdditionalProperties, setDateFormat, setDateFormatTimeZone, setExcludeProperties, setIncludeOnlyProperties, setPrefixDot
-
-
-
-
Method Detail
-
isActiveServer
public static boolean isActiveServer(@Nonnull java.util.Map<java.lang.String,java.lang.String> env)- Parameters:
env- The current system environment variables, obtained via System.getenv().- Returns:
- true, if the system environment variables contain the Azure specific environment variable; false otherwise
- See Also:
- Azure DevOps - Build variables
-
getBuildBranch
public java.lang.String getBuildBranch()
Attempts to extract the branch name from the Build.SourceBranch The branch of the triggering repo the build was queued for. Some examples: - Git repo branch: refs/heads/main - Git repo pull request: refs/pull/1/merge - TFVC repo branch: $/teamproject/main - TFVC repo gated check-in: Gated_2016-06-06_05.20.51.4369;username@live.com - TFVC repo shelveset build: myshelveset;username@live.com - When your pipeline is triggered by a tag: refs/tags/your-tag-name- Specified by:
getBuildBranchin classBuildServerDataProvider- Returns:
- the branch name provided by the server or an empty string
-
-