Skip to content

deploy sendgrid templates when deploying docker image #64

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: architectt1-feature/emailTemplatesClean
Choose a base branch
from

Conversation

gondzo
Copy link
Collaborator

@gondzo gondzo commented Sep 10, 2018

The following env variables should be added to circleci
{ENV}_SENDGRID_API_KEY
{ENV}_SENDGRID_TEMPLATE_ID
{ENV}_SENDGRID_VERSION_ID
@vikasrohit can you create these variables for dev/prod and merge


template=`cat ./emails-dist/template.html`
jq -n --arg template "$template" \
'{"active":1,"html_content":$template}' > request-data.txt

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gondzo Should we assume that it is always an active template version? Although, I don't see any use case of having id of an inactive template in the config, but I would like to avoid this just in case we have activated a different version in sendgrid than what we have configured in circle ci.

@vikasrohit
Copy link

Done @gondzo. Added the 3 variables for dev environment. You can test the integration now.

@vikasrohit
Copy link

However, @gondzo, I would not like to publish the template every time we deploy, just to avoid even a minor difference in the template that might arise because of some library changes or any ill commit. Can we use an environment variable to do the email template publish? So, that we explicitly deploy the new template along with a production release.

@vikasrohit
Copy link

@gondzo Are we done with this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants