Skip to content

Commit

Permalink
Merge pull request #471 from episphere/stage
Browse files Browse the repository at this point in the history
Stage -> Prod (November Release)
  • Loading branch information
we-ai authored Dec 5, 2023
2 parents 3d7c905 + 221d738 commit c7ea7c4
Show file tree
Hide file tree
Showing 16 changed files with 918 additions and 176 deletions.
1 change: 1 addition & 0 deletions config/dev/.env.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
GCLOUD_PROJECT: nih-nci-dceg-connect-dev
GCLOUD_BUCKET: connect_firestore_dev_backup
GCLOUD_SENDGRID_SECRET: projects/nih-nci-dceg-connect-dev/secrets/sendgrid/versions/1
GCLOUD_SENDGRID_EVENT_WEBHOOKSECRET: projects/nih-nci-dceg-connect-dev/secrets/sendgrid-event-webhook-verification-key/versions/1
SG_FROM_NAME: Connect for Cancer Prevention Study (DEV)
SG_FROM_EMAIL: [email protected]
4 changes: 4 additions & 0 deletions config/dev/cloudbuild2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ steps:
args: ['functions', 'deploy', 'importNotificationsToBigquery', '--trigger-resource=${_RESOURCE}', '--trigger-event=${_EVENT}', '--runtime=${_RUNTIME}', '--timeout=480s', '--source=${_SOURCE}', '--env-vars-file=config/dev/.env.yaml']
- name: 'gcr.io/cloud-builders/gcloud'
args: ['functions', 'deploy', 'exportNotificationsToBucket', '--trigger-topic=${_TOPIC}', '--runtime=${_RUNTIME}', '--timeout=480s', '--source=${_SOURCE}', '--env-vars-file=config/dev/.env.yaml']
- name: 'gcr.io/cloud-builders/gcloud'
args: ['functions', 'deploy', 'sendGridEventWebhook', '--trigger-http', '--runtime=${_RUNTIME}', '--timeout=240s', '--memory=1024MB', '--source=${_SOURCE}', '--env-vars-file=config/dev/.env.yaml']
- name: 'gcr.io/cloud-builders/gcloud'
args: ['functions', 'add-iam-policy-binding', 'sendGridEventWebhook', '--member=allUsers', '--role=${_ROLE}']
substitutions:
_SOURCE: https://source.developers.google.com/projects/nih-nci-dceg-connect-dev/repos/github_episphere_connectfaas/moveable-aliases/dev
_RUNTIME: nodejs14
Expand Down
1 change: 1 addition & 0 deletions config/prod/.env.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
GCLOUD_PROJECT: nih-nci-dceg-connect-prod-6d04
GCLOUD_BUCKET: myconnect_firestore_backup_prod
GCLOUD_SENDGRID_SECRET: projects/nih-nci-dceg-connect-prod-6d04/secrets/sendgrid/versions/1
GCLOUD_SENDGRID_EVENT_WEBHOOKSECRET: projects/nih-nci-dceg-connect-prod-6d04/secrets/sendgrid-event-webhook-verification-key/versions/1
SG_FROM_NAME: Connect for Cancer Prevention Study
SG_FROM_EMAIL: [email protected]
6 changes: 5 additions & 1 deletion config/prod/cloudbuild2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ steps:
- name: 'gcr.io/cloud-builders/gcloud'
args: ['functions', 'deploy', 'importNotificationsToBigquery', '--trigger-resource=${_RESOURCE}', '--trigger-event=${_EVENT}', '--runtime=${_RUNTIME}', '--timeout=480s', '--source=${_SOURCE}', '--env-vars-file=config/prod/.env.yaml']
- name: 'gcr.io/cloud-builders/gcloud'
args: ['functions', 'deploy', 'exportNotificationsToBucket', '--trigger-topic=${_TOPIC}', '--runtime=${_RUNTIME}', '--timeout=480s', '--source=${_SOURCE}', '--env-vars-file=config/prod/.env.yaml']
args: ['functions', 'deploy', 'exportNotificationsToBucket', '--trigger-topic=${_TOPIC}', '--runtime=${_RUNTIME}', '--timeout=480s', '--source=${_SOURCE}', '--env-vars-file=config/prod/.env.yaml']
- name: 'gcr.io/cloud-builders/gcloud'
args: ['functions', 'deploy', 'sendGridEventWebhook', '--trigger-http', '--runtime=${_RUNTIME}', '--timeout=240s', '--memory=1024MB', '--source=${_SOURCE}', '--env-vars-file=config/prod/.env.yaml']
- name: 'gcr.io/cloud-builders/gcloud'
args: ['functions', 'add-iam-policy-binding', 'sendGridEventWebhook', '--member=allUsers', '--role=${_ROLE}']
substitutions:
_SOURCE: https://source.developers.google.com/projects/nih-nci-dceg-connect-prod-6d04/repos/github_episphere_connectfaas
_RUNTIME: nodejs14
Expand Down
1 change: 1 addition & 0 deletions config/stage/.env.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
GCLOUD_PROJECT: nih-nci-dceg-connect-stg-5519
GCLOUD_BUCKET: myconnect_firestore_backup_stage
GCLOUD_SENDGRID_SECRET: projects/nih-nci-dceg-connect-stg-5519/secrets/sendgrid/versions/1
GCLOUD_SENDGRID_EVENT_WEBHOOKSECRET: projects/nih-nci-dceg-connect-stg-5519/secrets/sendgrid-event-webhook-verification-key/versions/1
SG_FROM_NAME: Connect for Cancer Prevention Study (STAGE)
SG_FROM_EMAIL: [email protected]
6 changes: 5 additions & 1 deletion config/stage/cloudbuild2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ steps:
- name: 'gcr.io/cloud-builders/gcloud'
args: ['functions', 'deploy', 'importNotificationsToBigquery', '--trigger-resource=${_RESOURCE}', '--trigger-event=${_EVENT}', '--runtime=${_RUNTIME}', '--timeout=480s', '--source=${_SOURCE}', '--env-vars-file=config/stage/.env.yaml']
- name: 'gcr.io/cloud-builders/gcloud'
args: ['functions', 'deploy', 'exportNotificationsToBucket', '--trigger-topic=${_TOPIC}', '--runtime=${_RUNTIME}', '--timeout=480s', '--source=${_SOURCE}', '--env-vars-file=config/stage/.env.yaml']
args: ['functions', 'deploy', 'exportNotificationsToBucket', '--trigger-topic=${_TOPIC}', '--runtime=${_RUNTIME}', '--timeout=480s', '--source=${_SOURCE}', '--env-vars-file=config/stage/.env.yaml']
- name: 'gcr.io/cloud-builders/gcloud'
args: ['functions', 'deploy', 'sendGridEventWebhook', '--trigger-http', '--runtime=${_RUNTIME}', '--timeout=240s', '--memory=1024MB', '--source=${_SOURCE}', '--env-vars-file=config/stage/.env.yaml']
- name: 'gcr.io/cloud-builders/gcloud'
args: ['functions', 'add-iam-policy-binding', 'sendGridEventWebhook', '--member=allUsers', '--role=${_ROLE}']
substitutions:
_SOURCE: https://source.developers.google.com/projects/nih-nci-dceg-connect-stg-5519/repos/github_episphere_connectfaas/moveable-aliases/stage
_RUNTIME: nodejs14
Expand Down
5 changes: 5 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const { dashboard } = require('./utils/dashboard');
const { getParticipantNotification } = require('./utils/notifications');
const { importToBigQuery, firestoreExport, exportNotificationsToBucket, importNotificationsToBigquery } = require('./utils/events');
const { participantDataCleanup } = require('./utils/participantDataCleanup');
const { sendGridEventWebhook } = require('./utils/sendGridEventWebhook');

// API End-Points for Sites

Expand Down Expand Up @@ -61,3 +62,7 @@ exports.importNotificationsToBigquery = importNotificationsToBigquery;
// End-Points for Participant Data Cleaning

exports.participantDataCleanup = participantDataCleanup

// End-Points for SendGrid Event Webhook

exports.sendGridEventWebhook = sendGridEventWebhook
79 changes: 54 additions & 25 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"@google-cloud/pubsub": "^2.10.0",
"@google-cloud/secret-manager": "^3.7.3",
"@google-cloud/storage": "^5.8.3",
"@sendgrid/eventwebhook": "7.7.0",
"@sendgrid/mail": "^6.5.5",
"crypto": "^1.0.1",
"fast-crc32c": "^2.0.0",
Expand Down
Loading

0 comments on commit c7ea7c4

Please sign in to comment.