Merged in bugfix/stages (pull request #193)

Bugfix/stages

Approved-by: Umang Mistry
This commit is contained in:
Michael McGuinness
2024-09-24 17:05:21 +00:00
+15 -17
View File
@@ -9,8 +9,6 @@ definitions:
export AWS_SECURITY_TOKEN=$(echo $STS_OUTPUT | jq -r '.Credentials.SessionToken'); export AWS_SECURITY_TOKEN=$(echo $STS_OUTPUT | jq -r '.Credentials.SessionToken');
export AWS_REGION='us-east-2'; export AWS_REGION='us-east-2';
stage: &deployment stage: &deployment
name: deployment
deployment: development
trigger: manual trigger: manual
steps: steps:
- step: - step:
@@ -24,12 +22,12 @@ definitions:
- schemachange -a $SNOWFLAKE_ACCOUNT -u $SNOWFLAKE_USER -r $SNOWFLAKE_ROLE -w $SNOWFLAKE_WAREHOUSE -d $SNOWFLAKE_DATABASE -c $SNOWFLAKE_DATABASE.SCHEMACHANGE.CHANGE_HISTORY --create-change-history-table -v - schemachange -a $SNOWFLAKE_ACCOUNT -u $SNOWFLAKE_USER -r $SNOWFLAKE_ROLE -w $SNOWFLAKE_WAREHOUSE -d $SNOWFLAKE_DATABASE -c $SNOWFLAKE_DATABASE.SCHEMACHANGE.CHANGE_HISTORY --create-change-history-table -v
caches: caches:
- pip - pip
condition: #condition:
changesets: # changesets:
includePaths: # includePaths:
- snowflake/**/* # - snowflake/**/*
- snowflake/**/**/* # - snowflake/**/**/*
- snowflake/**/**/**/* # - snowflake/**/**/**/*
- step: - step:
image: python:3.8 image: python:3.8
name: "Deploy streamlit to EC2" name: "Deploy streamlit to EC2"
@@ -47,11 +45,11 @@ definitions:
"if [ -d /home/ubuntu/doczy.ai ]; then cd /home/ubuntu/doczy.ai && git fetch && git pull; else cd /home/ubuntu && git clone git@bitbucket.org:aarete/doczy.ai.git; fi", "if [ -d /home/ubuntu/doczy.ai ]; then cd /home/ubuntu/doczy.ai && git fetch && git pull; else cd /home/ubuntu && git clone git@bitbucket.org:aarete/doczy.ai.git; fi",
"EOF" "EOF"
]' ]'
condition: #condition:
changesets: # changesets:
includePaths: # includePaths:
- streamlit/* # - streamlit/*
- streamlit/**/* # - streamlit/**/*
- step: - step:
name: "Deploy Airflow DAGs to S3 bucket" name: "Deploy Airflow DAGs to S3 bucket"
image: python:3.8 image: python:3.8
@@ -63,10 +61,10 @@ definitions:
- *aws-context - *aws-context
- aws sts get-caller-identity - aws sts get-caller-identity
- aws s3 sync ./airflow/dags s3://doczy-dev-infra-mwaa-resources/dags - aws s3 sync ./airflow/dags s3://doczy-dev-infra-mwaa-resources/dags
condition: #condition:
changesets: # changesets:
includePaths: # includePaths:
- airflow/dags/* # - airflow/dags/*
- step: - step:
image: hugree/terraform-with-snowsql:latest image: hugree/terraform-with-snowsql:latest
name: Run Snowsql name: Run Snowsql