简体   繁体   English

如何为Angle 7应用程序创建TFS 2017 CI / CD管道

[英]How do I create a TFS 2017 CI/CD pipeline for an angular 7 app

Is it possible to create a CI/CD pipeline for an Angular 7 app using an on premise install of TFS 2017? 是否可以使用本地安装的TFS 2017为Angular 7应用程序创建CI / CD管道?

I have done this on the cloud based VSTS and DevOps using the npm templates but these build tasks don't seem to be available on TFS 2017. 我已经使用npm模板在基于云的VSTS和DevOps上完成了此操作,但是这些构建任务似乎在TFS 2017上不可用。

I was thinking of creating a power shell script and running it as a build task but I have read issues with this method such as having to install the Angular CLI each time you build and problems with install locations on the build server. 我当时正在考虑创建Power Shell脚本并将其作为构建任务运行,但是我已经阅读了此方法的问题,例如每次构建时都必须安装Angular CLI,以及构建服务器上的安装位置问题。

I cannot upgrade the build server to use DevOps but I can install nodejs and anything else which may be required. 我无法升级构建服务器以使用DevOps,但可以安装Node.js以及可能需要的其他任何工具。

What I want to do is to build the angular code on checking, run the unit tests and deploy to another server if all is successful. 我要做的是在检查时构建角度代码,运行单元测试,如果一切成功,则将其部署到另一台服务器。

You could take a look at this detail tutorial here-- Angular 7 with Azure DevOps Build Pipeline 您可以在此处查看此详细教程- 带有Azure DevOps构建管道的Angular 7

Even though it's using YAML, it should be the same result if you are using visual UI in TFS/Azure DevOps Server. 即使使用的是YAML,但如果在TFS / Azure DevOps Server中使用可视化UI,则结果应相同。

It's just using npm command to run the build, kind of npm run pro-build-dev . 它只是使用npm命令来运行构建,而npm run pro-build-dev

If there is no such npm task in your TFS2017 server, you could try to download it from opensource GitHub Reop-- azure-pipelines-tasks . 如果您的TFS2017服务器中没有此类npm任务,则可以尝试从开源GitHub Reop -azure-pipelines-tasks下载它。 Or build your own task to involve the npm command line by referring the source code. 或通过引用源代码来构建涉及npm命令行的任务。

For build agent environment, you just need to make sure it's the same as your local environment. 对于构建代理环境,您只需要确保它与本地环境相同即可。 If you are fine to build your angular 7 app in your local develop machine. 如果您可以在本地开发机器上构建angular 7应用程序,则可以。 You should also be able to build it without any environment issue on your build agent. 您还应该能够在构建代理上没有任何环境问题的情况下进行构建。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我们如何在Bitbucket服务器中为Angular 8代码创建CI / CD管道以部署在Azure云中? - How can we create a CI/CD Pipeline for Angular 8 code in Bitbucket-server to be deployed in Azure Cloud? 如何将 Angular 环境变量传递给 Gitlab CI/CD 管道 - How to pass Angular environment variables to Gitlab CI/CD Pipeline Azure CI/CD 管道 Angular 失败 - Azure CI/CD pipeline Angular failing 用于 Angular 的 Gitlab 管道 CI/CD .gitlab-ci.yml - Gitlab Pipeline CI/CD .gitlab-ci.yml for Angular 具有多环境Azure的VSTS中Angular4应用程序的CI CD管道 - CI CD Pipeline for Angular4 Application in VSTS with Multiple Environment Azure 我如何将Angular 2应用程序部署到Azure? - How do I CI deploy my Angular 2 app to Azure? 如何将api / angular app / db项目的CI / CD设置为AZURE应用服务? - How to setup CI/CD for api/angular app/db project to AZURE app services? 如何使用 CI-CD 流程将 Angular8 应用程序部署到谷歌应用引擎? - How to deploy an Angular8 application to google app engine using CI-CD process? 在Azure中部署Angular应用程序并使用VSTS配置CI / CD - Deploying Angular app in Azure and configuring CI/CD using VSTS CI/CD 到 azure devops 中的 Angular Web 应用程序成功但没有任何反应 - CI/CD to angular web app in azure devops succeeded but nothing happen
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM