Integrating Azure Pipelines

A clean separation: Azure Pipelines for build and test, Jaws Deploy for release promotion.

Search guides... Ctrl K

Azure Pipelines integrates through a PowerShell task at the end of the build pipeline. The API key is stored as a secret pipeline variable or - cleaner - in an Azure DevOps variable group shared across pipelines that publish to the same Jaws Deploy workspace.

// azure-pipelines.yml fragment

Final stage that creates a Jaws Deploy release

Reference the variable group from the pipeline:


variables:
  - group: jaws-deploy
- stage: Release
  jobs:
  - job: CreateRelease
    pool:
      vmImage: 'windows-latest'
    steps:
    - task: PowerShell@2
      displayName: 'Create Jaws Deploy release'
      env:
        JAWS_API_KEY: $(JawsApiKey)
      inputs:
        targetType: 'inline'
        script: |
          Install-Module -Name JawsDeploy -Scope CurrentUser -Force
          Connect-JawsDeploy -Url "https://app.jawsdeploy.net" -ApiKey $env:JAWS_API_KEY
          New-JawsDeployRelease `
              -Workspace "default" `
              -Project   "checkout-service" `
              -Version   "$(Build.BuildNumber)" `
              -Packages  @{ "Checkout.Web" = "$(Build.BuildNumber)" }

Self-hosted agents

The pattern is the same on self-hosted agents - just make sure PowerShell 7 is installed and the agent can reach app.jawsdeploy.net (Cloud) or your Stack URL on the network. If the network is restricted, allow outbound HTTPS to those hosts.