Devops jenkins工作问题 [英] Devops jenkins jobs issue
问题描述
我的项目平台是dotnet。我们在jenkins有三个工作,我们的项目是prod,testand dev。我的问题是每次完成构建后我都需要在web配置文件中手动更改dev和测试的数据库名称。如何避免这个手动过程?是否有任何插件或脚本使其自动化?请解释一下。
提前致谢。
我尝试了什么:
我试过注入插件。但我不知道怎么写脚本
Hi,
My project platform is dotnet. we are having three jobs in jenkins for our project they are prod, testand dev. My issue is every time after completion of build i need to change database names for dev and test manually in web config file. How to avoid this manual process? Are there any plugins or scripts to make it automate? please explain me.
Thanks in advance.
What I have tried:
I tried inject plugin. But i dont know how to write the script
推荐答案
两个字Config transformations
Two words "Config transformations"
web-config-transformations
在解决方案中设置配置转换后,Jenkins对MSBuild进行了一些小改动步骤添加指定配置的命令行参数
After you have your config transformations setup in your solution it is a small changes in Jenkins to the MSBuild step to add Command Line Arguments specifying the configuration
/t:Build /p:Configuration=Test
这篇关于Devops jenkins工作问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!