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
|
||||
caches:
|
||||
- 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:
|
||||
image: hugree/terraform-with-snowsql:latest
|
||||
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"
|
||||
caches:
|
||||
- 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
|
||||
- step:
|
||||
name: Apply devops-pipeline
|
||||
@@ -87,13 +120,18 @@ definitions:
|
||||
caches:
|
||||
- pip
|
||||
- step:
|
||||
name: "Deploy Snowflake Changes"
|
||||
name: Apply 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 -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:
|
||||
- pip
|
||||
- step:
|
||||
@@ -108,7 +146,7 @@ definitions:
|
||||
- pip
|
||||
- step:
|
||||
image: python:3.8
|
||||
name: "Deploy streamlit to EC2"
|
||||
name: Apply streamlit to EC2
|
||||
oidc: true
|
||||
script:
|
||||
- *aws-context
|
||||
|
||||
Reference in New Issue
Block a user