简体   繁体   English

Azure DevOps:1 个解决方案多项目 CI/CD

[英]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 个项目的解决方案:

  • Web Api project (references Infrastructure, Repositories, and Models projects) Web Api 项目(参考基础设施、存储库和模型项目)
  • Website project (calls the Web Api for data and references Infrastructure, Repositories, and Models projects)网站项目(调用 Web Api 获取数据和参考基础设施、存储库和模型项目)
  • Node.js project (only calls the Web Api for data) Node.js 项目(只调用 Web Api 获取数据)
  • Infrastructure project (shared by Web Api and Website)基础设施项目(由 Web Api 和网站共享)
  • Repositories project (shared by Web Api and Website) Repositories 项目(由 Web Api 和网站共享)
  • Models project (shared by Web Api and Website)模型项目(由 Web Api 和网站共享)

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.

相关问题 Azure DevOps 中的多个 CI 管道? - Multiple CI pipelines in Azure DevOps? Azure DevOps CI/CD 和从源代码管理中分离连接字符串 - Azure DevOps CI/CD and Separating Connection Strings from Source Control kubernetes 和 azure Devops 在 CI/CD 方面的区别 - What it the difference between kubernetes and azure Devops in terms of CI/CD CI/CD 管道 Azure devops 部署发布后自动合并 - CI/CD pipelines Azure devops automatic merge after deploy release Azure DevOps 和特定项目的权限 - Azure DevOps and permissions to specific projects 使用 Powershell 脚本在 Azure 上配置 CI/CD 管道 - configuration CI/CD pipeline on Azure with Powershell Script 如何使用Azure CI CD过程将GitHub存储库的多个文件夹同步到单个AzureGit - How to sync multiple folders of GitHub repo to a single AzureGit using Azure CI CD process Azure DevOps 多个发布管道,用于单个 CI 构建管道,用于多个功能分支; ) - Azure DevOps multiple Release Pipelines for single CI Build Pipelie for multiple Feature Branches ; ) Azure DevOps-用于组合项目的克隆命令? - Azure DevOps - What clone command to combine projects? Azure devops:在不同存储库的分支上构建管道触发器 CI - Azure devops: Pipeline Trigger CI build on branch in different repositories
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM