Follow these steps:
1. Install ‘EnvInject’ plug-in in the Jenkins CI tool.
2. After installing ‘EnvInject’ plug-in, you will see ‘Inject environment variables’ option under ‘Add Build Step’.
3. Configure the plug-in with Jenkins job by clicking on ‘Inject environment variables’ option.
4. You will see two fields: ‘Properties File Path’ and ‘Properties Content’ field after adding ‘Inject environment variables’.
5. In ‘Properties File Path’ field, provide the path of the properties file, i.e. where it exists in the Automation project and in ‘Properties Content’ field, provide all the information that you want to change in the run time
6. Now, run the Jenkins’s job to set all the ‘Properties Content’ field data into environment variable of target Virtual machine temporarily.
7. Get the properties data from the System environment variables and update the properties file. This can be done by configuring the build.xml file