Class SecretSourceResolver


  • public class SecretSourceResolver
    extends Object
    Resolves secret variables and converts escaped internal variables.
    • Constructor Detail

    • Method Detail

      • encode

        public String encode​(@CheckForNull
                             String toEncode)
        Encodes String so that it can be safely represented in the YAML after export.
        Parameters:
        toEncode - String to encode
        Returns:
        Encoded string
        Since:
        1.25
      • resolve

        @Deprecated
        @Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class)
        public static String resolve​(ConfigurationContext context,
                                     String toInterpolate)
        Deprecated.
        use resolve(String)} instead.
        Resolve string with potential secrets
        Parameters:
        context - Configuration context
        toInterpolate - potential variables that need to revealed
        Returns:
        original string with any secrets that could be resolved if secrets could not be resolved they will be defaulted to default value defined by ':-', otherwise default to empty String. Secrets are defined as anything enclosed by '${}'
        Since:
        1.42
      • resolve

        public String resolve​(String toInterpolate)
        Resolve string with potential secrets
        Parameters:
        toInterpolate - potential variables that need to revealed
        Returns:
        original string with any secrets that could be resolved if secrets could not be resolved they will be defaulted to default value defined by ':-', otherwise default to empty String. Secrets are defined as anything enclosed by '${}'