[英]Azure DevOps: 1 Solution Multiple Projects CI/CD
I just started setting Azure DevOps with CI/CD.我刚刚开始使用 CI/CD 设置 Azure DevOps。 This might not be possible but I hope to find answers.
这可能是不可能的,但我希望能找到答案。
I have a solution with 6 projects:我有一个包含 6 个项目的解决方案:
Before I start searching on how to publish the Web Api, Website, and Node.js projects to their own Azure App Service within the CI/CD definitions:在我开始搜索如何在 CI/CD 定义中将 Web Api、网站和 Node.js 项目发布到它们自己的 Azure 应用服务之前:
Is it possible to set it up so that only certain projects are deployed?是否可以将其设置为仅部署某些项目? ie: the Node.js project is published only or only the Web Api and Website are published but not the Node.js.
即:仅发布 Node.js 项目或仅发布 Web Api 和网站而不发布 Node.js。
Or do I need to keep things in different solutions?还是我需要将事情保留在不同的解决方案中?
If I keep them in separate solutions, how does this affect the shared projects (Infrastructure, Repo, and Models) in reference to Source Control (Git)?如果我将它们保存在单独的解决方案中,这将如何影响与源代码管理 (Git) 相关的共享项目(基础架构、存储库和模型)? If I add code to the Models and Repo in the Web Api solution, do I commit these changes not he Web Api Git repo?
如果我向 Web Api 解决方案中的模型和存储库添加代码,我是否提交这些更改而不是 Web Api Git 存储库? How does this affect the other projects that reference the same Models and Repo projects?
这对引用相同 Models 和 Repo 项目的其他项目有何影响? Is this where Git submodules come into play?
这是 Git 子模块发挥作用的地方吗?
Update 1 (2019/3/8)更新 1 (2019/3/8)
Looks like I might be able to get this working in 1 solution using Path filters ( https://docs.microsoft.com/en-us/azure/devops/pipelines/build/triggers?view=azure-devops ).看起来我可以使用路径过滤器( https://docs.microsoft.com/en-us/azure/devops/pipelines/build/triggers?view=azure-devops )在 1 个解决方案中实现这一点。 Still interested in any further input.
仍然对任何进一步的输入感兴趣。
Hoping this helps others:希望这对其他人有帮助:
I solved this by using Path filters on the Build
definition and it works flawlessly.我通过在
Build
定义上使用Path 过滤器解决了这个问题,它完美地工作。 I have created 1 build definition per project that needs to live or be hosted somewhere (in my example, I have 3 Build
definitions: Web Api, Website, Node.js).我为每个需要存在或托管在某处的项目创建了 1 个构建定义(在我的示例中,我有 3 个
Build
定义:Web Api、网站、Node.js)。
With the proper path to the project in the Path filter only the proper Builds
spin up, and any projects untouched do not trigger a build.使用路径过滤器中项目的正确路径,只会启动正确的
Builds
,任何未触及的项目都不会触发构建。 Each build has it's own release
which then deploys the specified app to it's own destination.每个构建都有自己的
release
,然后将指定的应用程序部署到自己的目的地。
Look if I understand your question well, you need to deploy specific built parts Yes you can do this in azure DevOps.看看我是否理解你的问题,你需要部署特定的构建部分是的,你可以在 azure DevOps 中做到这一点。 In Azure DevOps you have build definition and release pipeline.
在 Azure DevOps 中,您有构建定义和发布管道。 In build you will build the projects and publish just 2 components which you mentioned and in release you will deploy them I hope I answered your question
在构建中,您将构建项目并仅发布您提到的 2 个组件,在发布中您将部署它们我希望我回答了您的问题
在这里回答: http : //www.mattruma.com/multiple-project-deployment-with-azure-devops/每个项目都有一个管道,然后根据需要调整触发器和部署。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.