Merged in feature/dryRuns (pull request #232)
Add dry runs * adddryruns * status Approved-by: Umang Mistry
This commit is contained in:
+41
-3
@@ -45,6 +45,22 @@ definitions:
|
|||||||
- python terraform.py plan --environment=$ENVIRONMENT --module=streamlit-server
|
- python terraform.py plan --environment=$ENVIRONMENT --module=streamlit-server
|
||||||
caches:
|
caches:
|
||||||
- pip
|
- pip
|
||||||
|
- step:
|
||||||
|
name: Plan Snowflake Changes
|
||||||
|
image: python:3.7
|
||||||
|
size: 2x
|
||||||
|
script:
|
||||||
|
- pip install snowflake-connector-python
|
||||||
|
- pip install schemachange --upgrade
|
||||||
|
- |
|
||||||
|
schemachange -a $SNOWFLAKE_ACCOUNT -u $SNOWFLAKE_USER \
|
||||||
|
-f snowflake/ \
|
||||||
|
-r $SNOWFLAKE_ROLE -w $SNOWFLAKE_WAREHOUSE \
|
||||||
|
-d $SNOWFLAKE_DATABASE -c $SNOWFLAKE_DATABASE.SCHEMACHANGE.CHANGE_HISTORY \
|
||||||
|
--create-change-history-table -v \
|
||||||
|
--dry-run
|
||||||
|
caches:
|
||||||
|
- pip
|
||||||
- step:
|
- step:
|
||||||
image: hugree/terraform-with-snowsql:latest
|
image: hugree/terraform-with-snowsql:latest
|
||||||
name: Plan Snowsql
|
name: Plan Snowsql
|
||||||
@@ -55,6 +71,23 @@ definitions:
|
|||||||
- python terraform.py plan --environment=$ENVIRONMENT --module=textract-pipeline/terraform --apply-extra-args="-target=null_resource.snowsql_client_create"
|
- python terraform.py plan --environment=$ENVIRONMENT --module=textract-pipeline/terraform --apply-extra-args="-target=null_resource.snowsql_client_create"
|
||||||
caches:
|
caches:
|
||||||
- pip
|
- pip
|
||||||
|
- step:
|
||||||
|
image: python:3.8
|
||||||
|
name: Plan streamlit to EC2
|
||||||
|
oidc: true
|
||||||
|
script:
|
||||||
|
- *aws-context
|
||||||
|
- apt-get install -y git
|
||||||
|
- >-
|
||||||
|
aws ssm send-command --document-name "AWS-RunShellScript" --instance-ids $INSTANCE_ID_TF --region $AWS_DEFAULT_REGION --parameters commands='[
|
||||||
|
"sudo -u ubuntu -i <<EOF",
|
||||||
|
"export HOME=/home/ubuntu",
|
||||||
|
"git config --global --add safe.directory /home/ubuntu/doczy.ai",
|
||||||
|
"if [ -d /home/ubuntu/doczy.ai ]; then cd /home/ubuntu/doczy.ai && git fetch && git status; else cd /home/ubuntu && echo \"Doczy.AI does not exist\"; fi",
|
||||||
|
"EOF"
|
||||||
|
]'
|
||||||
|
caches:
|
||||||
|
- pip
|
||||||
steps: &deployment-steps
|
steps: &deployment-steps
|
||||||
- step:
|
- step:
|
||||||
name: Apply devops-pipeline
|
name: Apply devops-pipeline
|
||||||
@@ -87,13 +120,18 @@ definitions:
|
|||||||
caches:
|
caches:
|
||||||
- pip
|
- pip
|
||||||
- step:
|
- step:
|
||||||
name: "Deploy Snowflake Changes"
|
name: Apply Snowflake Changes
|
||||||
image: python:3.7
|
image: python:3.7
|
||||||
size: 2x
|
size: 2x
|
||||||
script:
|
script:
|
||||||
- pip install snowflake-connector-python
|
- pip install snowflake-connector-python
|
||||||
- pip install schemachange --upgrade
|
- pip install schemachange --upgrade
|
||||||
- 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 \
|
||||||
|
-f snowflake/ \
|
||||||
|
-r $SNOWFLAKE_ROLE -w $SNOWFLAKE_WAREHOUSE \
|
||||||
|
-d $SNOWFLAKE_DATABASE -c $SNOWFLAKE_DATABASE.SCHEMACHANGE.CHANGE_HISTORY \
|
||||||
|
--create-change-history-table -v
|
||||||
caches:
|
caches:
|
||||||
- pip
|
- pip
|
||||||
- step:
|
- step:
|
||||||
@@ -108,7 +146,7 @@ definitions:
|
|||||||
- pip
|
- pip
|
||||||
- step:
|
- step:
|
||||||
image: python:3.8
|
image: python:3.8
|
||||||
name: "Deploy streamlit to EC2"
|
name: Apply streamlit to EC2
|
||||||
oidc: true
|
oidc: true
|
||||||
script:
|
script:
|
||||||
- *aws-context
|
- *aws-context
|
||||||
|
|||||||
Reference in New Issue
Block a user