Skip to content

Use Azure DevOps as your source code provider»

Spacelift supports Azure DevOps as the code source for your stacks and modules.

You can set up multiple Space-level and one default Azure DevOps integration per account.

Create the Azure DevOps integration»

Azure DevOps integration details

Learn more about setting up and using the Azure DevOps integration on the Azure DevOps source control page.

Initial setup»

  1. On the Source control tab, click Set up integration, then choose Azure DevOps on the dropdown. Create an Azure DevOps integration
  2. Integration name: Enter a name for your integration. It cannot be changed later because the Spacelift webhook endpoint is generated based on this name.
  3. Integration type: Default (all spaces) or Space-specific. Each Spacelift account can only support one default integration per VCS provider, which is available to all stacks and modules in the same Space as the integration.

Find your organization URL»

You will need your Azure DevOps organization URL, which usually follows this format: https://dev.azure.com/{my-organization-name}.

Tip

Depending on when your Azure DevOps organization was created, it may use a different format, for example: https://{my-organization-name}.visualstudio.com.

Azure DevOps main organization page

  1. Navigate to your main organization page in Azure DevOps.
  2. Copy the Azure DevOps organization URL.

Create a personal access token»

You need to create a personal access token in Azure DevOps to create the integration with Spacelift.

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

    Personal access tokens menu in Azure DevOps

  2. Click New Token.

  3. Fill in the details to create a new personal access token: Creating a new personal access token in Azure DevOps
    1. Name: Enter a descriptive name for the token.
    2. Organization: Select the organization to connect to Spacelift.
    3. Expiration: Select an expiration date for the token.
    4. Scopes: Select Custom defined, then check Read & write in the Code section.
  4. Click Create.
  5. Copy the token details to finish the integration in Spacelift. Successfully created Personal Access Token in Azure DevOps

Copy details into Spacelift»

Now that your personal access token has been created, return to the integration configuration screen in Spacelift.

  1. Organization URL: Paste your Azure DevOps organization URL.
  2. User facing host URL: Enter the URL that will be shown to the user and displayed in the Spacelift UI. This will be the same as the API host URL unless you are using VCS Agents.
  3. Personal access token: Paste the personal access token that Spacelift will use to access your Azure DevOps organization.
  4. Labels: Organize integrations by assigning labels to them.
  5. Description: A markdown-formatted free-form text field to describe the integration.
  6. Click Set up to save your integration details.

Set up webhooks»

For every Azure DevOps repository being used in Spacelift stacks or modules, you will need to set up a webhook to notify Spacelift about project changes.

Note

Default integrations are visible to all users of the account, but only root Space admins can see their details.

Space-level integrations will be listed to users with read access to the integration Space. Integration details, however, contain sensitive information (such as the webhook secret) and are only visible to those with admin access.

  1. On the Source code page, click the three dots next to the integration name.
  2. Click See details to find the webhook endpoint and webhook secret. Find webhook endpoint and secret

Configure webhooks in Azure DevOps»

  1. In Azure DevOps, select the project you are connecting to Spacelift.
  2. Navigate to Project settings > Service hooks.
  3. Click Create subscription, then select Web Hooks and click Next. Create webhooks in Azure DevOps
  4. On the Trigger page of the New Service Hooks Subscription window:
    1. Trigger on this type of event: Select Code pushed, then click Next. Creating Code pushed webhook integration in Azure DevOps
  5. In the Settings section of the Action page: Configuring webhook integration in Azure DevOps
    1. URL: Enter the webhook endpoint from Spacelift.
    2. Basic authentication username: Leave blank.
    3. Basic authentication password: Enter the webhook secret from Spacelift.
  6. Click Finish.
  7. Repeat steps 3 through 6 for the following event triggers:
    • Pull request created.
    • Pull request merge attempted.
    • Pull request updated.
    • Pull request commented on.

Once all hooks are created, you should see them on the Service Hooks page.

Service Hooks page with four configured webhook integrations in Azure DevOps

✅ Step 1 of the LaunchPad is complete! Now you can connect your cloud account.