I’m trying to implement the schemachnage cicd approach using github workflows to migrate to different environments (test/prd).
Below is my yaml file code. But it is not working as intended? I checked the schemaChange documentation and followed the same ? can someone help with this. Below is the yml code I was using.
I have the config file under the root directory /cicd/test/schemachange-config.yml
same for prod. And I declared teh password as environment variable. But it is throwing error like authentication issue. I’m sure that my password is correct.
name: Snowflake_CICD
on:
push:
branches:
- main
workflow_dispatch:
jobs:
deploy_tst:
runs-on: ubuntu-latest
environment: tst
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Install dependencies
run: pip install schemachange
- name: Deploy to TST
env:
SNOWFLAKE_PASSWORD: ${{ secrets.SNOWFLAKE_PASS }}
run: |
schemachange --config-folder ${{ github.workspace }}/cicd/test
deploy_prd:
needs: deploy_tst
runs-on: ubuntu-latest
environment: prd
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Install dependencies
run: pip install schemachange
- name: Deploy to PRD
env:
SNOWFLAKE_PASSWORD: ${{ secrets.SNOWFLAKE_PASS }}
run: |
schemachange --config-folder ${{ github.workspace }}/cicd/prod
Kindly help me to correct the code