在Jenkins CI中成功构建后,将多个发布配置文件.pubxml打包 [英] Package multiple publish profiles .pubxml after a successful build in Jenkins CI
问题描述
我正在使用 Jenkins 进行持续集成.
I'm using Jenkins for Continuous Integration.
现在,我在 Jenkins
中使用此命令在命令行参数中进行了构建步骤:
Right now I have a job with this command in Jenkins
in the command line arguments for a build step:
这是命令:
"%WORKSPACE%\OEVizion\ITVizion.OEVizion.Web\ITVizion.OEVizion.Web.csproj" /p:DeployOnBuild=true /p:PublishProfile="IT Vizion - Web Deploy Package for a given domain.pubxml"
它工作得很好,也就是说,在 .pubxml
文件中定义的指定文件夹中创建了Web部署程序包(.zip).
It works just fine, that is, the web deploy package (.zip) is created in the specified folder defined in the .pubxml
file.
不过,我想为我拥有的每个.pubxml文件(现在为3个)为特定的 ITVizion生成一个
. .zip
Web部署程序包.只需一次命令即可获得OEVizion.Web.csproj
However what I'd like to do is to generate a .zip
web deploy package for each of the .pubxml files that I have (right now 3) for this specific ITVizion.OEVizion.Web.csproj
in a single shot\command.
有了这个,我将拥有多个具有不同设置的.zip软件包,每次将提交推送到存储库并成功构建项目时,都可以将它们部署到不同的服务器上.
With this I'd have multiple .zip packages with different settings ready to be deployed to different servers every time a commit is pushed to the repository and the project builds successfully.
这可能吗?我应该如何处理?
Is this possible? How should I approach this?
推荐答案
发布问题后,我看到了解决方法:添加 多个构建步骤 .每个 .pubxml
文件一个.这样,对于3个发布配置文件,构建过程将运行3次,并且在Jenkins的Job执行结束时,您将获得3个Web部署 .zip
软件包.很好.
After posting the question I saw the way to go about this: Add multiple build steps. One for each .pubxml
file. That way the build process will run 3 times for the 3 publish profiles and you'll end up with 3 web deploy .zip
packages at the end of the Job execution in Jenkins. Nice.
这篇关于在Jenkins CI中成功构建后,将多个发布配置文件.pubxml打包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!