Class BitbucketServerConfiguration

    • Constructor Detail

      • BitbucketServerConfiguration

        @DataBoundConstructor
        public BitbucketServerConfiguration​(String adminCredentialsId,
                                            String baseUrl,
                                            @Nullable
                                            String id)
    • Method Detail

      • getGlobalCredentialsProvider

        public GlobalCredentialsProvider getGlobalCredentialsProvider​(Item item)
        For a given item, returns a global credential provider. The credentials are tracked and this should be the only way to fetch credentials.
        Parameters:
        item - which will use the credential.
        Returns:
        credential provider
      • getGlobalCredentialsProvider

        public GlobalCredentialsProvider getGlobalCredentialsProvider​(String context)
        Similar to getGlobalCredentialsProvider(Item) but without item. This is usually a case when fetching credentials as part of `doFill` methods.
        Parameters:
        context - a context which will be logged
        Returns:
        credential provider
      • getAdminCredentialsId

        public String getAdminCredentialsId()
      • getBaseUrl

        public String getBaseUrl()
        Returns the URL location of the server instance
        Returns:
        the bitbucket server base URL
      • setBaseUrl

        @DataBoundSetter
        public void setBaseUrl​(String baseUrl)
        Sets the URL location of the server instance
        Parameters:
        baseUrl - the Bitbucket Server base URL
      • getId

        public String getId()
      • getServerName

        @Nullable
        public String getServerName()
        Returns the name assigned to the server in Jenkins
        Returns:
        the server name
      • setServerName

        @DataBoundSetter
        public void setServerName​(String serverName)
        Sets the name assigned to the server in Jenkins
        Parameters:
        serverName - the server name
      • validate

        public FormValidation validate()
        Checks that the configuration is valid
        Returns:
        true if valid; false otherwise