Class GiteaServer

java.lang.Object
hudson.model.AbstractDescribableImpl<GiteaServer>
org.jenkinsci.plugin.gitea.servers.GiteaServer
All Implemented Interfaces:
Describable<GiteaServer>

public class GiteaServer extends AbstractDescribableImpl<GiteaServer>
Represents a Gitea Server instance.
  • Constructor Details

    • GiteaServer

      @Deprecated @Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) public GiteaServer(@CheckForNull String displayName, @NonNull String serverUrl, boolean manageHooks, @CheckForNull String credentialsId)
      Constructor
      Parameters:
      displayName - Optional name to use to describe the end-point.
      serverUrl - The URL of this Gitea Server
      manageHooks - true if and only if Jenkins is supposed to auto-manage hooks for this end-point.
      credentialsId - The IdCredentials.getId() of the credentials to use for auto-management of hooks.
    • GiteaServer

      @DataBoundConstructor public GiteaServer(@CheckForNull String displayName, @NonNull String serverUrl, boolean manageHooks, @CheckForNull String credentialsId, @CheckForNull String aliasUrl)
      Constructor
      Parameters:
      displayName - Optional name to use to describe the end-point.
      serverUrl - The URL of this Gitea Server
      manageHooks - true if and only if Jenkins is supposed to auto-manage hooks for this end-point.
      credentialsId - The IdCredentials.getId() of the credentials to use for auto-management of hooks.
      aliasUrl - The URL this Gitea Server thinks it is at.
      Since:
      1.0.5
  • Method Details

    • getDisplayName

      @CheckForNull public String getDisplayName()
    • getServerUrl

      @NonNull public String getServerUrl()
    • isManageHooks

      public final boolean isManageHooks()
      Returns true if and only if Jenkins is supposed to auto-manage hooks for this end-point.
      Returns:
      true if and only if Jenkins is supposed to auto-manage hooks for this end-point.
    • getCredentialsId

      @CheckForNull public final String getCredentialsId()
      Returns the IdCredentials.getId() of the credentials to use for auto-management of hooks.
      Returns:
      the IdCredentials.getId() of the credentials to use for auto-management of hooks.
    • getAliasUrl

      @CheckForNull public String getAliasUrl()
      Returns the getServerUrl() that the Gitea server believes it has when publishing webhook events or null if this is a normal environment and Gitea is accessed through one true URL and has been configured with that URL.
      Returns:
      the getServerUrl() that the Gitea server believes it has when publishing webhook events or null
      Since:
      1.0.5
    • credentials

      @CheckForNull public com.cloudbees.plugins.credentials.common.StandardCredentials credentials()
      Looks up the StandardCredentials to use for auto-management of hooks.
      Returns:
      the credentials or null.
    • getDescriptor

      public GiteaServer.DescriptorImpl getDescriptor()