简体   繁体   中英

Deploying Angular app in Azure and configuring CI/CD using VSTS

I'm learning to deploy an Angular app in Azure and configuring CI/CD using VSTS.

So, I created AngularHeroes app based on this tutorial.

Created a new resource (Web App service) in Azure.

In VSTS, created a new project, added a VSTS repository and cloned it to local to push the angular app code. For setting up CI/CD I followed this msdn article. And queued the build definition but it got failed with the following error, "npm failed with return code 4294963238". So, I checked this git article.

Also, I configured azure app's Deployment Options with this VSTS project. And pushed the code from local to VSTS repo and try to run the build again but got the same error.

So, I'm stuck and figuring out the missing pieces. Please let me know what's wrong here...

I have also attached screenshots for configuring 发布工件 , 建立定义 and 发布定义 , for more understanding about configuration.

1) Create account on VSTS and create project

在此输入图像描述

2) If you have code on VSTS then add code

在此输入图像描述

3) Go to build tab and click build

4) Now create pipeline

4.1) click on build and create build pipline

在此输入图像描述

4.2) Add bitbucket or any other version control from list for code source

在此输入图像描述

4.3 ) select npm and add following commands

在此输入图像描述

4.4) Select another npm and add following command

在此输入图像描述

4.5) Now select command line and add following command

在此输入图像描述

4.6) Create another npm and following commands

在此输入图像描述

4.7) one more npm and add following commands 在此输入图像描述

4.8 ) Select Azure App Service Deploy and add following commands

在此输入图像描述

4.9) Final steps

在此输入图像描述

5 ) clicked save and queue and will show you result , you can configure email notification also

在此输入图像描述

Based on my research, seems it's related to the caches. This thread for your reference : https://github.com/Microsoft/vsts-tasks/issues/1205

So, just try to enable the Clean source directory in the first Get sources step, then try it again.

Alternatively you can try to create a new definition, then try it again.

在此输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM