Class AzureDevOpsBuildServerData

    • 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:
        getBuildBranch in class BuildServerDataProvider
        Returns:
        the branch name provided by the server or an empty string