Package io.fabric8.jenkins.openshiftsync
Class CredentialsUtils
java.lang.Object
io.fabric8.jenkins.openshiftsync.CredentialsUtils
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final ConcurrentHashMap<String,String> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voiddeleteCredential(io.fabric8.kubernetes.api.model.Secret secret) static voiddeleteSourceCredentials(io.fabric8.openshift.api.model.BuildConfig buildConfig) static Stringstatic io.fabric8.kubernetes.api.model.SecretgetSourceSecretForBuildConfig(io.fabric8.openshift.api.model.BuildConfig buildConfig) static booleanDoes our configuration have credentials?static StringupdateSourceCredentials(io.fabric8.openshift.api.model.BuildConfig buildConfig) static StringupsertCredential(io.fabric8.kubernetes.api.model.Secret secret) Inserts or creates a Jenkins Credential for the given Secret
-
Field Details
-
KUBERNETES_SERVICE_ACCOUNT
- See Also:
-
UID_TO_SECRET_MAP
-
-
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
-
hasCredentials
public static boolean hasCredentials()Does our configuration have credentials?- Returns:
- true if found.
-