I have nodejs app. Can I deploy it to azure app service without VS or other big IDE?
So, I want an easy way to select branch what I need push it to azure and run default command for nodejs.
I'm stuck with it, because all of solution it is use VS.
You can deploy to azure app service by using Azure App Service Deployment step/task. For example:
Create a build definition
Add related step/task to build your project
Add Azure App Service Deployment step/task (Can publish using Web Deploy or upload files directly)
Select Triggers tab and enable Continuous Integration
Specify repository and branch filters
After that, the build will be triggered if you push changes to target branch.
Related article: Define a continuous integration build for your Node.js app
Regarding run command for nodejs, you can refer to this thread by using kudu API: Include node modules in azure deployment via VSTS.
This can be done. Take a look at the build and release functionality in Visual Studio Team Services.
With VSTS Build, you can trigger a build and push to an Azure Web App automatically on a Git check-in for a particular branch, or you can manually trigger the build and push.
Take a look at the Azure App Service Deploy task in VSTS build.
Note that since VSTS is pulling from your Git repo, it doesn't matter what IDE you use to actually develop your app with.
Also, VSTS is free for small teams and a single deployment pipeline.
Related
Is there a way to publish and deploy a .NET CORE web application automatically without using azure devops ? I just don't want to pay Azure devops to use a single pipeline once every two months. I don't use Docker, I have a simple application that I'd like to publish and deploy on my Linux server automatically, every time I change it in Github.
You could use github actions to deploy on a linux instance, Microsoft has a guide for setting it up here: https://learn.microsoft.com/en-us/dotnet/devops/create-dotnet-github-action
It's free to use, if using a public repo and it's free to start if it's a private repo
We have been developing an Angular application on Azure DevOps. My company wants to have the app running on another cloud service. Can anyone tell me: Can we create a pipeline that will deploy the production version of our application from build in Azure to this other cloud service? What are the pitfalls or potential obstacles? Is anyone doing it already that could speak to it from your experience? Thanks in advance.
If you want to deploy Angular application on Azure DevOps to Azure App Service via Azure Pipelines, you could follow below steps.
Create a build pipeline, add a npm task to install the npm packages required by the Angular application
use npm task to build the application and produce the assets to be published on the web server
Add a Publish Build Artifact task that generates the artifacts which will be provided later on as an input to release definition
The last step is to add a CD pipeline which will deploy the artifacts created by the build to the Azure Web App by using this Azure App Service Deploy task. See this tutorial for details.
If want to deploy to other cloud service, this doc provides the system-defined tasks, you could review it to find if there are existing available tasks. If not, you may need to develop a custom pipelines task extension or find if there are existing extensions in the Azure DevOps Marketplace.
I'm working on an API in core3.1. We have a build pipeline that builds and unit tests any change for any branch. And release pipelines for development and master branches. These deploy to designated app services in Azure.
Now we would like a release pipeline for feature branches. So what we want is a pipeline that can dynamically created app-services per feature branch and deploy to that app service. And preferably dynamically delete the app-service when the branch is deleted.
Just to clarify, the proces how we would like it:
a developer creates feature branch and pushes it >
the build pipeline builds it >
an app service gets created automatically >
stuff gets deployed to that app service >
developers work on the branch and changes get build and deployed to the app service like normal >
at some later point a developer deletes branch >
app service gets deleted automaticcaly
Is there any way to accomplish this? Maybe there is a standard way?
Feature branches are located in a subfolder, e.g. "feat/feature-branch-name".
I'm fairly new to Azure and DevOps.
Any help is appriciated. Thanks in advance.
You should follow the practice of Infrastructure as Code (IaC) and use ARM templates in your pipeline to create/update/delete your Azure resources. You can also use the built-in tasks available in Azure DevOps to deploy your ARM templates.
I pushed my .net core function application using visual studio and now setting up release pipeline. I can publish and execute the application just fine and it works great on the Azure portal. However when I see the builds for releases in azure-devOps that slot fails with the following error.
2019-06-19T23:21:33.3543380Z ##[error]Error: Deployment of msBuild generated package is not supported. Change package format or use Azure App Service Deploy task. D:\a\r1\a\_...AVFunctionCore.zip
I am not sure where I need to check in my setup to even start diagnosing the issue.
Here are the pipeline steps.
I create a new stage and then select a template of type (Azure app service deployment)
Under tasks
App type is Function App on Windows
Give the app name, resource group , give the slot and
package folder as
$(System.DefaultWorkingDirectory)/**/AVFunctionCore.zip
Everything else on this is left as default.
Azure function app deploy and release pipeline error
According to the error message:
Deployment of msBuild generated package is not supported. Change
package format or use Azure App Service Deploy task.
It seems you are not using the correct task to publish the generated package. Since the generated package is .zip, you can try the suggestion as error message said use Azure App Service Deploy task.
Azure App Service Deploy task:
Use this task in a build or release pipeline to deploy to a range of
App Services on Azure. The task works on cross-platform agents running
Windows, Linux, or Mac and uses several different underlying
deployment technologies.
The task works for ASP.NET, ASP.NET Core, PHP, Java, Python, Go, and
Node.js based web applications.
The task can be used to deploy to a range of Azure App Services such
as:
Web Apps on both Windows and Linux
Web Apps for Containers Function
Apps on both Windows and Linux
Function Apps for Containers
WebJobs
Apps configured under Azure App Service Environments
Check this blog Visual Studio 2017 Tools for Azure Functions and Continuous Integration with VSTS for some more details.
Hope this helps.
I get predefined pipeline from VS integration. So for those you have the same case:
In GUI/Classic mode Release page -> edit pipeline
Edit task in stage section (this is responsible for deploying)
Replace Azure Web App task with Azure App Service deploy
I have more than one project (web api + azure function) in my solution. For the web app I used the zip file, but for the azure function to work I needed to publish the whole folder.
Azure Function
Package or folder:
$(System.DefaultWorkingDirectory)/_Backend/drop
Web Api
Package or folder:
$(System.DefaultWorkingDirectory)/_Backend/drop/ClientAPI.zip
I'm trying to deploy an Angular app to Azure Web App using VSTS Continuous Integration.
My repository doesn't contain any .sln .pdb, it's just a static web site.
I have define my build to run npm, gulp, but I don't know how to create an artifact without building the the vs solution.
I would also need to create a release task to publish the web site to azure.
Does anybody has a build definition that would work for this deployment?
Thanks
You can add "Copy and Publish Build Artifacts" task to copy and publish the deployment files to artifact folder that can be used in "Release Management".
And then you can enable "FTP Deployment" for your Azure Web App and use "FTP Uploader" task to publish the files to Azure.
I've solved this a few ways:
Use azure git deploy. https://azure.microsoft.com/en-us/documentation/articles/web-sites-publish-source-control/ I bake the git credentials into a script, and force commit and publish the site to the azure url.
Use Publish-WebApplicationWebsite.ps1 from the Azure SDK https://azure.microsoft.com/en-us/documentation/articles/vs-azure-tools-publish-webapplicationwebsite-windows-powershell-script/ I recall handing it a folder, but it appears the current version takes in an MSDeploy package.