Spacelift
PrivacyT&Cs
  • 👋Hello, Spacelift!
  • 🚀Getting Started
  • 🌠Main concepts
    • Stack
      • Creating a stack
      • Stack settings
      • Organizing stacks
      • Stack locking
      • Drift detection
    • Configuration
      • Environment
      • Context
      • Runtime configuration
        • YAML reference
    • Run
      • Task
      • Proposed run (preview)
      • Tracked run (deployment)
      • Module test case
      • User-Provided Metadata
      • Run Promotion
      • Pull Request Comments
    • Policy
      • Login policy
      • Access policy
      • Approval policy
      • Initialization policy
      • Plan policy
      • Push policy
      • Task policy
      • Trigger policy
    • Resources
    • Worker pools
    • VCS Agent Pools
  • 🛰️Platforms
    • Terraform
      • Module registry
      • External modules
      • Provider
      • State management
      • Terragrunt
      • Version management
      • Handling .tfvars
      • CLI Configuration
      • Cost Estimation
      • Resource Sanitization
      • Storing Complex Variables
      • Debugging Guide
    • Pulumi
      • Getting started
        • C#
        • Go
        • JavaScript
        • Python
      • State management
      • Version management
    • CloudFormation
      • Getting Started
      • Reference
      • Integrating with SAM
      • Integrating with the serverless framework
    • Kubernetes
      • Getting Started
      • Authenticating
      • Custom Resources
      • Helm
      • Kustomize
  • ⚙️Integrations
    • Audit trail
    • Cloud Integrations
      • Amazon Web Services (AWS)
      • Microsoft Azure
      • Google Cloud Platform (GCP)
    • Source Control
      • GitHub
      • GitLab
      • Azure DevOps
      • Bitbucket Cloud
      • Bitbucket Datacenter/Server
    • Docker
    • GraphQL API
    • Single sign-on
      • GitLab OIDC Setup Guide
      • Okta OIDC Setup Guide
      • OneLogin OIDC Setup Guide
      • Azure AD OIDC Setup Guide
      • AWS IAM Identity SAML 2.0 Setup Guide
    • Slack
    • Webhooks
  • 📖Product
    • Privacy
    • Security
    • Support
      • Statement of Support
    • Disaster Continuity
    • Billing
      • Stripe
      • AWS Marketplace
    • Terms and conditions
    • Refund Policy
  • Cookie Policy
Powered by GitBook
On this page
  • Setting up the integration
  • Finding your Organization URL
  • Creating a Personal Access Token
  • Creating the Integration
  • Configuring Webhooks
  • Using the Integration
  • Unlinking the Integration

Was this helpful?

  1. Integrations
  2. Source Control

Azure DevOps

PreviousGitLabNextBitbucket Cloud

Last updated 3 years ago

Was this helpful?

In addition to our out-of-the-box , Spacelift supports using Azure DevOps as the source of code for your and .

Setting up the integration

In order to set up the integration from the Spacelift side, please navigate to the VCS providers section of the admin Settings page, find the Azure DevOps integration and click the Set up button:

This should open a form like this one:

Finding your Organization URL

Now you'll have to fill in the Organization URL, which is the main URL of your Azure DevOps organization.

The Azure DevOps Organization URL usually has the following format:

  • https://dev.azure.com/{my-organization-name}

Depending on when your Azure DevOps organization was created, it may use a different format, for example:

  • https://{my-organization-name}.visualstudio.com

Creating a Personal Access Token

1. Go to User settings -> Personal access tokens (in the top right section of the Azure DevOps page)

2. On the Personal Access Tokens page click + New Token

3. Create a new personal access token. There, you will need to set the name of your token, expiration and scope. For Spacelift give it Code (Source code, repositories, pull requests and notifications) Read & write access.

4. Once the token is created, put it into the Personal access token field on the Spacelift Azure DevOps setup form.

Creating the Integration

After doing all this you should have all fields filled in.

If all the data is correct, after saving you should see two notifications in the bottom right part of Spacelift: New integration was created; and Connecting to Azure DevOps succeeded.

Configuring Webhooks

In order for Spacelift to be notified of any changes made in your Azure DevOps repos, you need to setup webhooks in Azure DevOps. You can find your webhook endpoint and webhook password under the Azure DevOps VCS integration section:

For each Azure DevOps project you want to use with Spacelift, you now have to go into its Project settings -> Service hooks -> Create subscription. Within the services list choose Webhook and click Next.

We will need to create multiple integrations: Code pushed, Pull request created, Pull request merge attempted and Pull request updated. Let's first create Code pushed integration.

Once on the Trigger page of New Service Hooks Subscription window, select Code pushed in the Trigger on this type of event dropdown and click Next.

After clicking Next you should see the Action page. Under the Settings section fill in the Spacelift Webhook endpoint URL. Leave Basic authentication username empty and put the Webhook password under Basic authentication password and click Finish.

Once done you should see the list of configured Service Hooks. Repeat the same process for the others. Afterwards you should see the configured webhooks on the Service Hooks settings page.

Using the Integration

When creating a Stack, you will now be able to choose the Azure DevOps provider and a repository inside of it:

Unlinking the Integration

If you no-longer need the integration, you can remove it via the Unlink button on the VCS settings page.

Please also remember to remove any Spacelift webhooks from your repositories.

You can find out more about Azure DevOps URLs .

In order to create a you need to:

⚙️
here
Personal access token
integration with GitHub
stacks
modules
VCS providers page
Azure DevOps setup form
Azure DevOps main organization page
Personal access tokens menu in Azure DevOps
Personal Access Tokens page in Azure DevOps
Creating a new personal access token in Azure DevOps
Successfully created Personal Access Token in Azure DevOps
Filled in Azure DevOps integration form
Configured Azure DevOps integration
Creating a Webhook integration in Azure DevOps
Creating Code pushed webhook integration in Azure DevOps
Configuring webhook integration in Azure DevOps
Service Hooks page with four configured webhook integrations in Azure DevOps
Stack creation form
VCS providers page