Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pass additional variables for preview deployments #101

Open
sakethsomaraju opened this issue Dec 13, 2024 · 0 comments
Open

pass additional variables for preview deployments #101

sakethsomaraju opened this issue Dec 13, 2024 · 0 comments

Comments

@sakethsomaraju
Copy link
Contributor

Provide a way to pass additional variables for preview deployments.

Use case: In case, if parent deployment is configured with secrets backend, AIRFLOW__SECRETS__BACKEND_KWARGS⁠⁠⁠⁠⁠⁠⁠ will not be copied from parent deployment to preview deployment ( since it is a secret variable ). So passing it explicitly can help configuring the secret backend for preview deployment.

Workaround for this issue to create the variable in a separate step post deployment creation :


jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - name: Deploy to Astro DAGS
      id: deploy_to_astro
      continue-on-error: true
      # if: ${{ github.event.inputs.deploy_type == 'DAGS' }}
      uses: astronomer/[email protected]
      with:
        action: create-deployment-preview
        deployment-id: ${{ env.DEPLOYMENT_ID }}
    - name: add backend kwargs
      id: export-env
      run: |
        # install the Astro CLI
        curl -sSL https://install.astronomer.io | sudo bash -s

        # update variables
        astro deployment variable create --deployment-id ${{ steps.deploy_to_astro.outputs.preview-id	 }} AIRFLOW__SECRETS__BACKEND_KWARGS=${{ secrets.HCV_KWARGS }} --secret


The fix for this issue should enable passing variables while using action: create-deployment-preview

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant