Class CredentialsUtils


  • public class CredentialsUtils
    extends Object
    • Constructor Detail

      • CredentialsUtils

        public CredentialsUtils()
    • Method Detail

      • 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.