Skip to main content

Documentation Index

Fetch the complete documentation index at: https://astronomer-preview.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Use the following CI/CD templates to automate deploying Apache Airflow dags from a Git repository to Astro with Bitbucket. The templates for Bitbucket use the image 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

To automate code deploys to a Deployment using Bitbucket, complete the following setup in a Git-based repository that hosts an Astro project:
  1. Set the following environment variable as a Bitbucket pipeline variable:
    • ASTRO_API_TOKEN: The value for your Workspace or Organization API token.
    • ASTRO_DEPLOYMENT_ID: Your Deployment ID.
    For production Deployments, be sure to set the value of your API token as secured.
  2. Create a new YAML file in bitbucket-pipelines.yml at the root of the repository that includes the following configuration:
    pipelines:
      pull-requests: # The branch pattern under pull requests defines the *source* branch.
        dev:
          - step:
              name: Deploy to Production
              deployment: Production
              script:
                - curl -sSL install.astronomer.io | sudo bash -s
                - astro deploy ${ASTRO_DEPLOYMENT_ID} -f
              services:
                - docker