Deploying a Node.js App to Azure App Service Using Azure DevOps (Classic Editor)

Dileepa Mabulage
4 min readJun 19, 2024

--

1. Build Pipeline

In Azure, DevOps, navigate to the section of the pipeline and click new pipeline.

Click onuse the classic editor

Select your Nodejs Repository from the Git Providers.

Select Nodejs with Gulp from the template search.

From the agent specification, select Windows latest. and remove the Run gulp task by right clicking and removing the selected task.

Agen job one should look like this.

Click save and queue.

Add save commit and run.

You can view the successful build.

2. Create App Service

Azure portal portal.azure.com creates an linux app service with a Node 20 runtime stack.

3. Create a Service Connection To Authenticate Pipelines

If you don’t have admin permission in the Azure Portal, you must create a service connection to authenticate Azure pipelines.

Under DevOps project settings => Service connections.

Select Azure Resource Manager

Select Service principle automatic

Select the subscription, the resource group where the app service was created and the connection name and description.

Check the Grant Permission for all pipelines check box.

3. Release Pipeline

In pipeline releases, new release pipeline

Select Nodejs App service as the template.

Click on one job,, 1 task.

In the Azure Subscription, select the service connection, or if you are an admin,you can select the subscription.

Set the app type as Web App on Linux, because we created an app service on Linux. and select the app service.

In pipeline section, click add an artifact.

Select the previously craeted artifact in the build stage.

Add the artifact.

Save and create release.

In the pipeline section, you can see the deployment.

You can hover over the stage entity and select the logs.

After successful deployment, navigate to the App service URL.

GitHub Repository

--

--