mirror of
https://github.com/FlipsideCrypto/external-models.git
synced 2026-02-06 11:41:50 +00:00
add/deployment-adhoc (#35)
This commit is contained in:
parent
5cc9b3f43d
commit
3638eb97b1
12
.github/workflows/dbt_run_adhoc.yml
vendored
12
.github/workflows/dbt_run_adhoc.yml
vendored
@ -48,21 +48,19 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
environment:
|
environment:
|
||||||
name: workflow_${{ inputs.environment }}
|
name: workflow_${{ inputs.environment }}
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
command: ${{fromJson(inputs.dbt_command)}}
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- uses: actions/setup-python@v1
|
- uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: "3.7.x"
|
python-version: "3.10"
|
||||||
|
cache: "pip"
|
||||||
|
|
||||||
- name: install dependencies
|
- name: install dependencies
|
||||||
run: |
|
run: |
|
||||||
pip3 install dbt-snowflake==${{ vars.DBT_VERSION }} cli_passthrough requests click
|
pip install -r requirements.txt
|
||||||
dbt deps
|
dbt deps
|
||||||
- name: Run DBT Jobs
|
- name: Run DBT Jobs
|
||||||
run: |
|
run: |
|
||||||
${{ matrix.command }}
|
${{ inputs.dbt_command }}
|
||||||
7
.github/workflows/dbt_run_daily.yml
vendored
7
.github/workflows/dbt_run_daily.yml
vendored
@ -31,13 +31,14 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- uses: actions/setup-python@v1
|
- uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: "3.7.x"
|
python-version: "3.10"
|
||||||
|
cache: "pip"
|
||||||
|
|
||||||
- name: install dependencies
|
- name: install dependencies
|
||||||
run: |
|
run: |
|
||||||
pip3 install dbt-snowflake==${{ vars.DBT_VERSION }} cli_passthrough requests click
|
pip install -r requirements.txt
|
||||||
dbt deps
|
dbt deps
|
||||||
- name: Run DBT Jobs
|
- name: Run DBT Jobs
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
46
.github/workflows/dbt_run_deployment.yml
vendored
Normal file
46
.github/workflows/dbt_run_deployment.yml
vendored
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
name: dbt_run_deployment
|
||||||
|
run-name: dbt_run_deployment
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
branches:
|
||||||
|
- "main"
|
||||||
|
inputs:
|
||||||
|
warehouse:
|
||||||
|
type: choice
|
||||||
|
description: Snowflake warehouse
|
||||||
|
required: true
|
||||||
|
options:
|
||||||
|
- DBT
|
||||||
|
- DBT_CLOUD
|
||||||
|
- DBT_EMERGENCY
|
||||||
|
default: DBT
|
||||||
|
dbt_command:
|
||||||
|
type: string
|
||||||
|
description: 'DBT Run Command'
|
||||||
|
required: true
|
||||||
|
|
||||||
|
env:
|
||||||
|
DBT_PROFILES_DIR: ./
|
||||||
|
DBT_VERSION: "${{ vars.DBT_VERSION }}"
|
||||||
|
ACCOUNT: "${{ vars.ACCOUNT }}"
|
||||||
|
ROLE: "${{ vars.ROLE }}"
|
||||||
|
USER: "${{ vars.USER }}"
|
||||||
|
PASSWORD: "${{ secrets.PASSWORD }}"
|
||||||
|
REGION: "${{ vars.REGION }}"
|
||||||
|
DATABASE: "${{ vars.DATABASE }}"
|
||||||
|
WAREHOUSE: "${{ inputs.WAREHOUSE }}"
|
||||||
|
SCHEMA: "${{ vars.SCHEMA }}"
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
called_workflow_template:
|
||||||
|
uses: FlipsideCrypto/analytics-workflow-templates/.github/workflows/dbt_run_deployment_template.yml@main
|
||||||
|
with:
|
||||||
|
dbt_command: |
|
||||||
|
${{ inputs.dbt_command }}
|
||||||
|
environment: workflow_prod
|
||||||
|
warehouse: ${{ inputs.WAREHOUSE }}
|
||||||
|
secrets: inherit
|
||||||
7
.github/workflows/dbt_run_dev_refresh.yml
vendored
7
.github/workflows/dbt_run_dev_refresh.yml
vendored
@ -31,13 +31,14 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- uses: actions/setup-python@v1
|
- uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: "3.7.x"
|
python-version: "3.10"
|
||||||
|
cache: "pip"
|
||||||
|
|
||||||
- name: install dependencies
|
- name: install dependencies
|
||||||
run: |
|
run: |
|
||||||
pip3 install dbt-snowflake==${{ vars.DBT_VERSION }} cli_passthrough requests click
|
pip install -r requirements.txt
|
||||||
dbt deps
|
dbt deps
|
||||||
- name: Run DBT Jobs
|
- name: Run DBT Jobs
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
7
.github/workflows/dbt_run_weekly.yml
vendored
7
.github/workflows/dbt_run_weekly.yml
vendored
@ -31,13 +31,14 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- uses: actions/setup-python@v1
|
- uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: "3.7.x"
|
python-version: "3.10"
|
||||||
|
cache: "pip"
|
||||||
|
|
||||||
- name: install dependencies
|
- name: install dependencies
|
||||||
run: |
|
run: |
|
||||||
pip3 install dbt-snowflake==${{ vars.DBT_VERSION }} cli_passthrough requests click
|
pip install -r requirements.txt
|
||||||
dbt deps
|
dbt deps
|
||||||
- name: Run DBT Jobs
|
- name: Run DBT Jobs
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
7
.github/workflows/dbt_test.yml
vendored
7
.github/workflows/dbt_test.yml
vendored
@ -33,13 +33,14 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- uses: actions/setup-python@v1
|
- uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: "3.7.x"
|
python-version: "3.10"
|
||||||
|
cache: "pip"
|
||||||
|
|
||||||
- name: install dependencies
|
- name: install dependencies
|
||||||
run: |
|
run: |
|
||||||
pip3 install dbt-snowflake==${{ vars.DBT_VERSION }} cli_passthrough requests click
|
pip install -r requirements.txt
|
||||||
dbt deps
|
dbt deps
|
||||||
- name: Run DBT Jobs
|
- name: Run DBT Jobs
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
1
requirements.txt
Normal file
1
requirements.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
dbt-snowflake>=1.4,<1.5
|
||||||
Loading…
Reference in New Issue
Block a user