Class CredentialsUtils

java.lang.Object
io.fabric8.jenkins.openshiftsync.CredentialsUtils

public class CredentialsUtils extends Object
  • Field Details

  • Constructor Details

    • CredentialsUtils

      public CredentialsUtils()
  • Method Details

    • getSourceSecretForBuildConfig

      public static io.fabric8.kubernetes.api.model.Secret getSourceSecretForBuildConfig(io.fabric8.openshift.api.model.BuildConfig buildConfig)
    • updateSourceCredentials

      public static String updateSourceCredentials(io.fabric8.openshift.api.model.BuildConfig buildConfig) throws IOException
      Throws:
      IOException
    • deleteSourceCredentials

      public static void deleteSourceCredentials(io.fabric8.openshift.api.model.BuildConfig buildConfig) throws IOException
      Throws:
      IOException
    • upsertCredential

      public static String upsertCredential(io.fabric8.kubernetes.api.model.Secret secret) throws IOException
      Inserts or creates a Jenkins Credential for the given Secret
      Parameters:
      secret - the secret to insert
      Returns:
      the insert secret name
      Throws:
      IOException - when the update of the secret fails
    • deleteCredential

      public static void deleteCredential(io.fabric8.kubernetes.api.model.Secret secret)
    • getCurrentToken

      public static String getCurrentToken()
    • hasCredentials

      public static boolean hasCredentials()
      Does our configuration have credentials?
      Returns:
      true if found.