Package fi.meliora.testlab.ext.jenkins
Class VariableReplacer
java.lang.Object
fi.meliora.testlab.ext.jenkins.VariableReplacer
A simple replacer class to replace tags with build environment variables in a String.
- Author:
- Meliora Ltd
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionVariableReplacer
(Map<String, String>... vars) Creates a new variable replacer by combining key-value maps provided. -
Method Summary
-
Field Details
-
vars
-
-
Constructor Details
-
VariableReplacer
Creates a new variable replacer by combining key-value maps provided.- Parameters:
vars
- variables
-
-
Method Details
-
replace
Replaces all tags in format ${BUILD_NUMBER} with matching value from envVars. If variable is missing, tag is left as it is.- Parameters:
src
- source String- Returns:
- String with variables replaced
-
getVars
-