testing ssm commands with new dev instance
This commit is contained in:
+20
-4
@@ -16,7 +16,15 @@ definitions:
|
||||
export AWS_SECRET_ACCESS_KEY=$(echo $STS_OUTPUT | jq -r '.Credentials.SecretAccessKey');
|
||||
export AWS_SECURITY_TOKEN=$(echo $STS_OUTPUT | jq -r '.Credentials.SessionToken');
|
||||
export AWS_REGION='us-east-2';
|
||||
steps:
|
||||
- script: &ssm-send-command
|
||||
aws ssm send-command --document-name "AWS-RunShellScript" --instance-ids $DEV_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 pull; else cd /home/ubuntu && git clone git@bitbucket.org:aarete/doczy.ai.git; fi",
|
||||
"EOF"
|
||||
]'
|
||||
|
||||
- step: &snowflake_deploy
|
||||
name: "Deploy Snowflake Changes"
|
||||
image: python:3.7
|
||||
@@ -103,12 +111,20 @@ pipelines:
|
||||
includePaths:
|
||||
- snowflake/**/*
|
||||
- step:
|
||||
<<: *streamlit_deploy
|
||||
image: python:3.8
|
||||
name: "Deploy streamlit to EC2"
|
||||
oidc: true
|
||||
script:
|
||||
- python -m pip install --upgrade pip
|
||||
- apt-get update && apt-get install -y jq git
|
||||
- pip install awscli
|
||||
- *aws-context
|
||||
- *ssm-send-command
|
||||
condition:
|
||||
changesets:
|
||||
includePaths:
|
||||
- "streamlit/*"
|
||||
- "streamlit/**/*"
|
||||
- streamlit/*
|
||||
- streamlit/**/*
|
||||
- step:
|
||||
<<: *airflow_dags_deploy
|
||||
condition:
|
||||
|
||||
Reference in New Issue
Block a user