JuChom
JuChom

Reputation: 5999

VSTS Deploy to Azure WebApp For Linux

Is it possible to deploy an application from VSTS to a WebApp on Linux.

My Webapp is a simple ruby app and I'm currently deploying it with the hosted git repo like in the doc: https://learn.microsoft.com/en-us/azure/app-service/containers/quickstart-ruby

git remote add azure <Git deployment URL from above>
git add -A
git commit -m "Initial deployment commit"
git push azure master

Is there a way to do it using a repo in VSTS?

Upvotes: 0

Views: 723

Answers (1)

starian chen-MSFT
starian chen-MSFT

Reputation: 33728

First, the Azure App Service Deployment task supports Web App on Linux app service type, so you can deploy your ruby app through this task, for example:

  1. Create a new build definition
  2. Specify the source with corresponding repository and branch
  3. Add Archive files task to put necessary files to zip file
  4. Add Azure App Service Deploy task (App type: Linux Web App; Image Source: Built-in Image; Package or folder: [zip file in step 3]; Runtime Stack: Ruby 2.3)

Note: You can deploy it through Release.

Secondly, if Deployment option is available, you can configure it in azure portal: Continuous Deployment to Azure App Service.

On the other hand, you also can push source to server through git command as you are using:

  1. Add Command Line task: (Tool: git; Arguments: remove add azure [git deployment URL]; Working folder: $(build.SourcesDirectory)). Note: the git deployment URL should contains username and password, for example: https://[username]:[password]@[app name].scm.azurewebsites.net/[app name].git (username can’t contains @ character)
  2. The same as other git command

Upvotes: 2

Related Questions