# Azure Pipelines

> Integrate Applivery with Azure Pipelines for automated Mobile App Distribution using Fastlane or the Applivery API.

Source: https://docs.applivery.com/en/app-distribution/ci-cd/azure-pipelines/  •  Last updated: 2026-04-01

**Key topics:** Azure Pipelines integration, Applivery Upload API, Fastlane integration, Mobile CI/CD, Automated app distribution, Azure DevOps, Azure Pipelines, Applivery, Fastlane, Microsoft, iOS, Android

---

**TL;DR:** Integrate Applivery with Azure Pipelines to automate mobile app distribution using Fastlane or the Applivery API.

![azure-pipelines-long](https://www.applivery.com/wp-content/uploads/2021/12/azure-pipelines-long-1024x307.png "azure-pipelines-long | Applivery")

[Azure DevOps](https://azure.microsoft.com/en-us/services/devops/) is a Microsoft platform that covers the full application lifecycle — version control, project management, automated Builds, testing, and release management. [Azure Pipelines](https://azure.microsoft.com/en-us/services/devops/pipelines/), part of the Azure DevOps suite, provides cloud-hosted CI/CD pipelines for Linux, macOS, and Windows, supporting web, desktop, and mobile applications.

The Applivery integration with Azure Pipelines lets you automatically upload new Builds to Applivery at the end of each pipeline run, making them immediately available to QA teams, stakeholders, or internal users.

There are two approaches to integrating Azure Pipelines with Applivery:

- **Via Fastlane** (recommended for iOS and Android projects that already use Fastlane) — delegates the upload to the Applivery Fastlane plugin.
- **Via the Applivery Upload API directly** (recommended for any project or when Fastlane is not in use) — calls the API with a `curl` step in your YAML pipeline.

---

## Prerequisites

Before setting up either approach, make sure you have:

- An Azure DevOps account with an Azure Pipelines configuration in place.
- An Applivery App API Token. Find it in **App Settings → API Tokens** in the Applivery Dashboard, or see [Apps API Authentication](https://docs.applivery.com/en/app-distribution/api/app-api-token/).
- A pipeline that produces a Build artifact (`.ipa`, `.apk`, `.aab`, or another supported format).

---

**Store the App Token as a Secret Variable**

Never hardcode your Applivery token directly in `azure-pipelines.yml`. Store it as a secret pipeline variable in Azure DevOps so it is masked in logs and not committed to your repository.

1. Open your Azure DevOps project and go to **Pipelines → your pipeline → Edit**.
2. Click **Variables** (top right).
3. Add a new variable named `APPLIVERY_TOKEN`.
4. Paste your Applivery App API Token as the value.
5. Enable the **Keep this value secret** toggle to mask it in logs.
6. Save.
![azure-devops-pipelines-vars](https://www.applivery.com/wp-content/uploads/2021/12/azure-devops-pipelines-vars-1024x559.png "azure-devops-pipelines-vars | Applivery")

Once defined, reference it in your pipeline YAML as `$(APPLIVERY_TOKEN)`.

**Option A — Integration via Fastlane**

This is the recommended approach if your project already uses Fastlane for building and signing. The Applivery Fastlane plugin handles the upload and all metadata automatically.

For full Fastlane plugin documentation, see [Fastlane Integration](https://docs.applivery.com/en/app-distribution/ci-cd/fastlane/).

### Pipeline YAML

In your `azure-pipelines.yml`, add a script step that invokes your Fastlane lane and passes the token as a parameter:

```yaml
- script: fastlane dev_deploy applivery_token:$(APPLIVERY_TOKEN)
  displayName: 'Deploy to Applivery via Fastlane'
  env:
    APPLIVERY_TOKEN: $(APPLIVERY_TOKEN)
```

### Fastfile

Define a lane in your `Fastfile` that Builds and uploads to Applivery. The example below uses `last_git_commit[:message]` as the changelog and `number_of_commits` to auto-increment the Build number:

```ruby
desc "Build and deploy to Applivery"
lane :dev_deploy do |options|
  increment_build_number(
    build_number: number_of_commits
  )

  build_app(
    scheme: "MyApp-Dev",
    export_method: "enterprise"
  )

  applivery(
    app_token: options[:applivery_token],
    notify_collaborators: true,
    changelog: last_git_commit[:message]
  )
end
```

:::tip
You can extend the `applivery` action with additional options like `tags`, `notify_message`, and `notify_language`. See the [Fastlane Integration](https://docs.applivery.com/en/app-distribution/ci-cd/fastlane/) documentation for all available parameters.
:::

**Option B — Integration via the Upload API (without Fastlane)**

If you are not using Fastlane, or want a simpler setup with no additional tooling, call the Applivery Upload API directly from your pipeline using `curl`. This works for any platform and any pipeline agent.

### Pipeline YAML — iOS example

```yaml
trigger:
  - main

pool:
  vmImage: 'macos-latest'

stages:
  - stage: Build
    jobs:
      - job: BuildAndUpload
        steps:
          - checkout: self

          - task: Xcode@5
            displayName: 'Build iOS app'
            inputs:
              actions: 'build'
              scheme: 'MyApp'
              sdk: 'iphoneos'
              configuration: 'Release'
              xcWorkspacePath: 'MyApp.xcworkspace'
              packageApp: true
              signingOption: 'default'

          - script: |
              curl 'https://upload.applivery.io/v1/integrations/builds' \
                --retry 5 \
                --fail \
                -H "Authorization: Bearer $(APPLIVERY_TOKEN)" \
                -F "build=@$(Build.ArtifactStagingDirectory)/MyApp.ipa" \
                -F "versionName=$(Build.BuildNumber)" \
                -F "changelog=$(Build.SourceVersionMessage)" \
                -F "tags=azure-pipelines, ios" \
                -F "notifyCollaborators=true" \
                -F "notifyMessage=New build available from Azure Pipelines" \
                -F "notifyLanguage=en" \
                -F "deployer.name=Azure Pipelines" \
                -F "deployer.info.commit=$(Build.SourceVersion)" \
                -F "deployer.info.branch=$(Build.SourceBranchName)" \
                -F "deployer.info.commitMessage=$(Build.SourceVersionMessage)" \
                -F "deployer.info.buildUrl=$(System.TeamFoundationCollectionUri)$(System.TeamProject)/_build/results?buildId=$(Build.BuildId)" \
                -F "deployer.info.buildNumber=$(Build.BuildNumber)" \
                -F "deployer.info.repositoryUrl=$(Build.Repository.Uri)"
            displayName: 'Upload to Applivery'
            env:
              APPLIVERY_TOKEN: $(APPLIVERY_TOKEN)
```

### Pipeline YAML — Android example

```yaml
trigger:
  - main

pool:
  vmImage: 'ubuntu-latest'

stages:
  - stage: Build
    jobs:
      - job: BuildAndUpload
        steps:
          - checkout: self

          - task: Gradle@3
            displayName: 'Build Android APK'
            inputs:
              workingDirectory: ''
              gradleWrapperFile: 'gradlew'
              gradleOptions: '-Xmx3072m'
              tasks: 'assembleRelease'

          - script: |
              curl 'https://upload.applivery.io/v1/integrations/builds' \
                --retry 5 \
                --fail \
                -H "Authorization: Bearer $(APPLIVERY_TOKEN)" \
                -F "build=@$(Build.ArtifactStagingDirectory)/app-release.apk" \
                -F "versionName=$(Build.BuildNumber)" \
                -F "changelog=$(Build.SourceVersionMessage)" \
                -F "tags=azure-pipelines, android" \
                -F "notifyCollaborators=true" \
                -F "notifyMessage=New Android build from Azure Pipelines" \
                -F "notifyLanguage=en" \
                -F "deployer.name=Azure Pipelines" \
                -F "deployer.info.commit=$(Build.SourceVersion)" \
                -F "deployer.info.branch=$(Build.SourceBranchName)" \
                -F "deployer.info.commitMessage=$(Build.SourceVersionMessage)" \
                -F "deployer.info.buildUrl=$(System.TeamFoundationCollectionUri)$(System.TeamProject)/_build/results?buildId=$(Build.BuildId)" \
                -F "deployer.info.buildNumber=$(Build.BuildNumber)" \
                -F "deployer.info.repositoryUrl=$(Build.Repository.Uri)"
            displayName: 'Upload to Applivery'
            env:
              APPLIVERY_TOKEN: $(APPLIVERY_TOKEN)
```

---

## Azure Pipelines predefined variables

The pipeline examples above use Azure Pipelines predefined variables, which are automatically available in every pipeline without additional configuration:

| Variable | Description |
|---|---|
| `Build.BuildNumber` | The Build number. Useful as a `versionName` in Applivery. |
| `Build.BuildId` | Unique numeric ID for the Build run. Used to construct the Build URL. |
| `Build.SourceVersion` | The full Git commit SHA that triggered the Build. |
| `Build.SourceBranchName` | The name of the triggering branch. E.g. `main`, `develop`. |
| `Build.SourceVersionMessage` | The commit message of the triggering commit. Useful as `changelog`. |
| `Build.Repository.Uri` | The URL of the source repository. |
| `Build.ArtifactStagingDirectory` | The local directory where build artifacts are placed. |
| `System.TeamFoundationCollectionUri` | The base URL of your Azure DevOps organization. |
| `System.TeamProject` | The name of the Azure DevOps project. |

For the full list of predefined variables, see the [Azure Pipelines predefined variables documentation](https://docs.microsoft.com/en-us/azure/devops/pipelines/build/variables).

---

## Key upload parameters reference

The `curl` form data fields map directly to the Applivery Upload API. These are the most commonly used:

| Parameter | Description |
|---|---|
| `build` | The binary file to upload. |
| `versionName` | Human-readable label for the Build. Using `$(Build.BuildNumber)` links it to the Azure run. |
| `changelog` | Release notes shown in the Dashboard and notification emails. |
| `tags` | Comma-separated tags for filtering Builds. |
| `notifyCollaborators` | Set to `true` to email app Collaborators on upload. |
| `notifyMessage` | Custom message included in the notification email. |
| `deployer.name` | CI platform name shown in the Applivery Dashboard. |
| `deployer.info.commit` | Git commit SHA. |
| `deployer.info.branch` | Git branch name. |
| `deployer.info.buildNumber` | Pipeline build number. |
| `deployer.info.buildUrl` | Direct URL to the Azure pipeline run. |

For the full parameter reference, see [POST – Upload a Build](https://docs.applivery.com/en/app-distribution/api/builds/upload-build/).
