I am having the following deployment pipeline for a Spring application (Maven).
Build -> DEV -> TST -> PROD
The war file is build in the first step then copied to each environment. The Problem I am facing now is that I need different properties for the different environments. I have created the following property files:
- application-dev.properties
- application-int.properties
- application-prod.properties
What is best practice to automatically assign the correct environments to each deployment step so that the corrosponding property file for each environment is chosen automatically.
For local testing I have used the following. But I dont know how to transfer that to Jenkins.
-Drun.jvmArguments="-Dspring.profiles.active="int"