Skip to main content

Astro CI/CD templates for Azure DevOps

Use the following CI/CD templates to automate deploying Apache Airflow DAGs from a Git repository to Astro with Azure DevOps.

The templates for Azure DevOps use the image-only deploy process with a single branch implementation, which requires only one Astro Deployment.

If you use the DAG-only deploy feature on Astro or you're interested in a multiple-branch implementation, see Template overview to configure your own. To learn more about CI/CD on Astro, see Choose a CI/CD strategy.

Prerequisites

Single branch implementation

Complete the following setup in an Azure repository that hosts an Astro project:

  1. Set the following environment variables as DevOps pipeline variables:

    • ASTRONOMER_KEY_ID = <your-key-id>
    • ASTRONOMER_KEY_SECRET = <your-key-secret>
  2. Create a new Azure DevOps pipeline named astro-devops-cicd.yaml at the root of the repository that includes the following configuration:

    trigger:
    - main

    pr: none

    stages:
    - stage: deploy
    jobs:
    - job: deploy_image
    pool:
    vmImage: 'Ubuntu-latest'
    steps:
    - script: |
    curl -sSL install.astronomer.io | sudo bash -s
    astro deploy
    env:
    ASTRONOMER_KEY_ID: $(ASTRONOMER_KEY_ID)
    ASTRONOMER_KEY_SECRET: $(ASTRONOMER_KEY_SECRET)

Sign up for Developer Updates

Get a summary of new Astro features once a month.

You can unsubscribe at any time.
By proceeding you agree to our Privacy Policy, our Website Terms and to receive emails from Astronomer.