CI_VSTS在单个解决方案中为每个项目发布不同的Web工件 [英] CI_VSTS publish different web Artifact for each project in single solution

查看:57
本文介绍了CI_VSTS在单个解决方案中为每个项目发布不同的Web工件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个CI管道(VSTS),可以在其中构建整个解决方案,其中在一个工件中包含两个网站项目.我想要做的是构建整个解决方案,然后为每个项目创建发布工件. 例如 Project_website1的一个工件 Project_website2的一个工件 谢谢.我在StackOverflow中尝试了类似的主题,但对我没用

I have a CI pipeline(VSTS) in which I am able to build whole solution which has two website projects in it in a single artifact. What I want to do it build whole solution and then create publish artifact for each project. e.g. One artifact for Project_website1 One artifact for Project_website2 thanks. I tried similar topic in StackOverflow but didnt work for me

推荐答案

这就是我所做的 由于我正在使用自己的代理 因此,网络项目将发布在代理的每个项目发布目录中. 那是目录a.

This is what I have done As I am using my own agent So the web projects are published in agent’s each project published directory. That is directory a.

解决方案: 我所做的就是在vsts将所有网站都放置在发布目录a中之后,构建了整个解决方案. 我编写了powershell脚本来获取项目的每个文件,并将其放在已发布文件夹a的子目录下.

Solution: All i did was after builidng the whole solution once vsts put all website in publish directory a. I wrote powershell script to get each file for project and put it under subdirectory in published folder a.

例如 构建解决方案后,发布文件夹a将如下所示 Website1 ....... xml 网站1..zip . . . Website2 ........ xml 网站2 ........ zip . .

E.g Publish folder a will look like this after building solution Website1.......xml Website1.......zip . . . Website2........xml Website2........zip . . .

等 构建解决方案后,文件将位于文件夹togeter的上方.

Etc When solution is build the files will be in above folder togeter.

为了为每个项目构建工件,我编写了powershell脚本将每个项目文件放在子目录中 例如 一个\网站1 Website1 ....... xml Website1 ....... zip

In order to build artifact for each project i wrote powershell script to put each project file in sub directory E.g a\website1 Website1.......xml Website1.......zip

a \ website2 Website2 ....... xml Website2 ....... zip

a\website2 Website2.......xml Website2.......zip

等等

之后,为每个目录选择每个发布工件,然后您可以为每个项目拥有工件. 谢谢

After that select each publish artifact for each directory and you can have artifact for each project. Thanks

这篇关于CI_VSTS在单个解决方案中为每个项目发布不同的Web工件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆