Class CredentialsUtils

java.lang.Object
io.jenkins.plugins.armorcode.credentials.CredentialsUtils

public class CredentialsUtils extends Object
  • Constructor Details

    • CredentialsUtils

      public CredentialsUtils()
  • Method Details

    • getSecretText

      public static String getSecretText(Run<?,?> run, String credentialsId)
      Retrieves a secret text credential by its ID.
      Parameters:
      run - the current build run, needed for credentials lookup
      credentialsId - the credentials ID as configured in Jenkins Credentials
      Returns:
      the secret text or null if not found
    • getArmorCodeToken

      public static String getArmorCodeToken(Run<?,?> run)
      Convenience method to get the ArmorCode Token.
    • getSystemToken

      public static String getSystemToken()
      Gets the ArmorCode token from system credentials. Used for system-level operations like job discovery.