【发布时间】:2016-03-15 08:36:49
【问题描述】:
我有以下用于 Spring 应用程序 (Maven) 的部署管道。
构建 -> 开发 -> TST -> 生产
war 文件在第一步中构建,然后复制到每个环境。我现在面临的问题是我需要为不同的环境提供不同的属性。我创建了以下属性文件:
- application-dev.properties
- application-int.properties
- application-prod.properties
最佳做法是自动为每个部署步骤分配正确的环境,以便自动选择每个环境的对应属性文件。
对于本地测试,我使用了以下内容。但我不知道如何将其转移给 Jenkins。
-Drun.jvmArguments="-Dspring.profiles.active="int"
【问题讨论】:
标签: spring spring-mvc jenkins spring-boot jenkins-workflow