---
title: Integrate Capawesome Insiders with Azure DevOps
description: Install private Capawesome Insiders npm packages in Azure DevOps pipelines. Configure access tokens, npm registry, and CI/CD for Capacitor apps.
---

# Azure DevOps

You can use private Capawesome npm packages within your [Azure Pipelines](https://azure.microsoft.com/products/devops/pipelines){:target="_blank"} by configuring the Capawesome npm registry.
This guide shows you how to set up authentication to access the private packages from the Capawesome Insiders program.

## Preparation

### Create an Azure Pipeline Variable

[Get your license key](../faq.md#where-can-i-find-my-license-key) and add it to your Azure Pipeline as a secret variable with the name `CAPAWESOME_NPM_REGISTRY_TOKEN` as described in [Set secret variables](https://learn.microsoft.com/en-us/azure/devops/pipelines/process/variables?view=azure-devops&tabs=yaml%2Cbatch#secret-variables){:target="_blank"}. Make sure to mark the variable as secret.

???+ warning "Keep your license key secure"

    Never commit your license key directly to your repository and always use environment variables to store sensitive information like authentication tokens.

## Pipeline Configuration

### Configure the npm registry

Add the following script steps to your Azure Pipeline **before** installing npm dependencies:

```yaml
- script: echo "@capawesome-team:registry=https://npm.registry.capawesome.io" >> .npmrc
  displayName: Configure Capawesome npm registry
- script: echo "//npm.registry.capawesome.io/:_authToken=$(CAPAWESOME_NPM_REGISTRY_TOKEN)" >> .npmrc
  displayName: Authenticate with Capawesome registry
```

This will automatically configure npm to use the Capawesome registry for `@capawesome-team` packages during Azure DevOps builds.

### Example

Here's a complete example of an `azure-pipelines.yml` file that builds an Ionic app using private Capawesome packages:

```yaml
trigger:
- main

pool:
  vmImage: ubuntu-latest

variables:
  - name: nodeVersion
    value: '20.x'

jobs:
- job: Build
  displayName: Build App
  steps:
  - checkout: self
    displayName: Checkout Repository
  - task: UseNode@1
    inputs:
      version: $(nodeVersion)
    displayName: Setup Node.js $(nodeVersion)
  - script: echo "@capawesome-team:registry=https://npm.registry.capawesome.io" >> .npmrc
    displayName: Configure Capawesome npm registry
  - script: echo "//npm.registry.capawesome.io/:_authToken=$(CAPAWESOME_NPM_REGISTRY_TOKEN)" >> .npmrc
    displayName: Authenticate with Capawesome registry
  - script: npm ci
    displayName: Install Dependencies
  - script: npx cap sync
    displayName: Sync Capacitor
  - script: npm run build
    displayName: Build App
  - task: PublishBuildArtifacts@1
    inputs:
      pathtoPublish: 'dist'
      artifactName: 'build-output'
    displayName: Publish Build Artifacts
```
