Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
Mayra Peña authored and Mayra Peña committed Nov 11, 2024
1 parent 33ca1ee commit 1f0c0e8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 17 deletions.
11 changes: 1 addition & 10 deletions .github/workflows/push-to-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,11 @@ jobs:

# Perform the deployment to Prod
build:
# Need to make sure that when the PR was closed, it was actually merged.
# Need to make sure that when the PR was closed, it was actually merged.
# if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main'

name: Deployment Script
runs-on: ubuntu-latest
# outputs:
# manifest_found: ${{ steps.prod_manifest.outputs.manifest_found }}

# Set environment variables in
# https://github.com//<your org>/<your repo>/settings/variables/actions
Expand Down Expand Up @@ -84,23 +82,16 @@ jobs:
id: prod-manifest
run: "../automate/dbt/get_artifacts.sh"

- name: Debug output
run: "echo Manifest found: ${{ steps.prod-manifest.outputs.manifest_found }}"

# Runs blue green with no deferral
- name: Run blue / green deployment
if: ${{ steps.prod-manifest.outputs.manifest_found == 'false' }}
id: run-blue-green
# env:
# MANIFEST_FOUND: ${{ steps.prod_manifest.outputs.manifest_found }}
run: "dbt-coves blue-green"

# Runs blue green with deferral
- name: Run blue / green deployment with deferral
if: ${{ steps.prod-manifest.outputs.manifest_found == 'true' }}
id: run-blue-green-defer
# env:
# MANIFEST_FOUND: ${{ steps.prod_manifest.outputs.manifest_found }}
run: "dbt-coves blue-green --defer"

- name: Drop orphaned relations in db that are no longer in dbt
Expand Down
9 changes: 3 additions & 6 deletions automate/dbt/get_artifacts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,16 @@ then
echo "Manifest not found in Snowflake stage, contact the Snowflake administrator to load a updated manifest to snowflake."
# This is used by github actions
# echo "::set-output name=manifest_found::false"
# echo "manifest_found=false" >> $GITHUB_OUTPUT
# Debugging statement
# echo "Wrote manifest_found=false to GITHUB_OUTPUT"
echo "manifest_found=false" >> $GITHUB_OUTPUT

# This is used by Jenkins
# echo "false" > temp_MANIFEST_FOUND.txt
else
echo "Updated manifest from production"

# This is used by github actions
echo "::set-output name=manifest_found::true"
# echo "manifest_found=true" >> $GITHUB_OUTPUT
# echo "Wrote manifest_found=true to GITHUB_OUTPUT"
# echo "::set-output name=manifest_found::true"
echo "manifest_found=true" >> $GITHUB_OUTPUT

# This is used by Jenkins
# echo "true" > temp_MANIFEST_FOUND.txt
Expand Down
2 changes: 1 addition & 1 deletion transform/.dbt_coves/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ blue_green:
prod_db_env_var: DATACOVES__MAIN__DATABASE # This holds the name of the production database --- no default
# staging_database: STAGING_DB # Optional name you want to give to the staging database --- no default
# staging_suffix: STAGING # If not using staging_database above, {prod_db}_{staging_suffix} will be used --- default: STAGING
drop_staging_db_at_start: true # Start blue-green by dropping staging db --- default false
drop_staging_db_at_start: false # Start blue-green by dropping staging db --- default false
drop_staging_db_on_failure: false # Drop staging db if blue-green fails --- default false
keep_staging_db_on_success: false # Keep staging db if blue-green succeeds --- default false
# dbt_selector: "-s personal_loans" # dbt build arguments --- no default
Expand Down

0 comments on commit 1f0c0e8

Please sign in to comment.