Package io.jenkins.plugins.casc
Class SecretSourceResolver
- java.lang.Object
-
- io.jenkins.plugins.casc.SecretSourceResolver
-
public class SecretSourceResolver extends Object
Resolves secret variables and converts escaped internal variables.
-
-
Constructor Summary
Constructors Constructor Description SecretSourceResolver(ConfigurationContext configurationContext)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description String
encode(String toEncode)
Encodes String so that it can be safely represented in the YAML after export.static String
resolve(ConfigurationContext context, String toInterpolate)
Deprecated.useresolve(String)
} instead.String
resolve(String toInterpolate)
Resolve string with potential secrets
-
-
-
Constructor Detail
-
SecretSourceResolver
public SecretSourceResolver(ConfigurationContext configurationContext)
-
-
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.useresolve(String)
} instead.Resolve string with potential secrets- Parameters:
context
- Configuration contexttoInterpolate
- 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 '${}'
-
-