I am very new to use jenkins groovy pipelines. I am trying to find a way to replace environment specific variables in config files, something like
<appender name="AdoNetAppender" type="log4net.Appender.ADONetAppender">
<connectionString value="#{LogDatabaseConnectionString}" />
</appender>
So during a build step I want to run Variable replacement step which can replace all variables managed by AWS parameter store.
I know there are ways to replace variables using plugins like Envject but it replaces ENV variables defined in jenkins. Other option is to have a parameterized build which can become complex as number of config variables grow.
Possible solution could be to run shell script to replace variables using file.
So, I am looking for options
1) whats the effective way of storing environment specific variables using jenkins pipeline
2) whats the variable replacement strategy to use? e.g. text, content based replacement or other plugins.
Any help is highly appreciated.
Thanks in advance.