Skip to content

Commit

Permalink
Merge pull request #466 from pangeo-data/staging
Browse files Browse the repository at this point in the history
staging -> prod
  • Loading branch information
tjcrone committed Nov 1, 2019
2 parents 5f7001c + b67f36b commit a65efa5
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -266,9 +266,14 @@ jobs:
- run:
name: Deploy ooi.pangeo.io
when: always
no_output_timeout: 1200
command: |
EMAIL="tjcrone@gmail.com"
SUBJECT="CircleCI Error"
BODY="Deployment to ooi-${CIRCLE_BRANCH} failed on `date -u +'%D at %T UTC.'`"
errormsg() { ./.circleci/send-email "${EMAIL}" "${SUBJECT}" "${BODY}"; }
trap errormsg ERR
hubploy deploy ooi pangeo-deploy ${CIRCLE_BRANCH}
no_output_timeout: 1200
workflows:
version: 2
Expand Down
15 changes: 15 additions & 0 deletions .circleci/send-email
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash
# script to send email from CircleCI using SendGrid
# pass as arguments: email address, email subject, email body

# define message attributes
SENDER_EMAIL="no-reply@pangeo.io"
SENDER_NAME="Pangeo"

# send message
curl --url https://api.sendgrid.com/v3/mail/send \
--header "Authorization: Bearer $SENDGRID_API_KEY" \
--header "Content-Type: application/json" \
--data '{"personalizations":[{"to":[{"email":"'"${1}"'"}], "subject":"'"${2}"'"}], \
"from":{"email":"'"${SENDER_EMAIL}"'","name":"'"${SENDER_NAME}"'"}, \
"content": [{"type": "text/plain", "value": "'"${3}"'"}]}'
1 change: 1 addition & 0 deletions deployments/ooi/image/binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ dependencies:
- pip
- pip:
- azure
- git+https://github.com/ooicloud/ooi-opendata.git@master

0 comments on commit a65efa5

Please sign in to comment.