Skip to main content

Azure Pipelines

Azure Pipelines automatically builds and tests code projects to make them available to others. Azure Pipelines combines continuous integration (CI) and continuous delivery (CD) to constantly and consistently test and build your code and ship it to any target, such as Azure App Service or the new Azure Static Web Apps.

The following YAML workflow file created into the ./azure-pipelines.yml as a default by superplate, if Azure Pipelines is selected as a CI plugin.

azure-pipelines.yml
trigger:  - main  - master      pr:  - main  - master
pool:  vmImage: ubuntu-latest
jobs:  - job:    steps:      - checkout: self        persistCredentials: true
      - task: NodeTool@0        inputs:          versionSpec: "14.x"        displayName: "Setup node env"
      - script: |          'npm ci'        displayName: "Install dependencies"
      - script: |          'npm run lint'        displayName: "Run lint"
      - script: |          'npm run test'        displayName: "Run tests"
note

If you are using Yarn2, you can take advantage of Zero-Installs, negating the need for a caching step.

tip

The following commands are added to azure-pipelines.yml by superplate if any of plugins listed below is selected during project creation phase.

note

You can use the following commands in case of adding Azure Pipelines to existing project later.

Package manager#


- npm ci

Install dependencies#


- npm ci

Run ESlint#


- npm run lint

Testing#


Run tests#

- npm run test

Run Cypress E2E Testing#

- npm run cypress:test

WebdriverIO E2E Testing#

- npm run webdriver:run
tip

If you are building a static-rendered Next.js website in Azure, consider deploying to Azure Static Web Apps