Skip to content

Commit

Permalink
Merge pull request #80 from biomage-org/add-batch-datadog-env
Browse files Browse the repository at this point in the history
[BIOMAGE-2264] - Pass datadog keys to batch
  • Loading branch information
aerlaut authored Jan 3, 2023
2 parents 0d8ee5a + a594921 commit b757271
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ const submitBatchJob = (context, step) => {
JobQueue: `queue-pipeline-${environment}`,
ContainerOverrides: {
Environment: [
{
Name: 'EXPERIMENT_ID',
Value: `${experimentId}`,
},
{
Name: 'ACTIVITY_ARN',
Value: `${activityArn}`,
Expand Down Expand Up @@ -49,8 +53,12 @@ const submitBatchJob = (context, step) => {
Value: `${config.domainName}`,
},
{
Name: 'EXPERIMENT_ID',
Value: `${experimentId}`,
Name: 'DD_API_KEY',
Value: `${config.datadogApiKey}`,
},
{
Name: 'DD_APP_KEY',
Value: `${config.datadogAppKey}`,
},
],
ResourceRequirements: [
Expand Down
3 changes: 3 additions & 0 deletions src/config/default-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ const config = {
corsOriginUrl: [...externalOrigins, `https://${domainName}`],
emailDomainName: `https://${domainName}`,
publicApiUrl: `https://api.${domainName}`,
// Used for Batch reporting
datadogApiKey: process.env.DD_API_KEY || '',
datadogAppKey: process.env.DD_APP_KEY || '',
};

// We are in permanent develop staging environment
Expand Down
2 changes: 2 additions & 0 deletions src/config/test-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,6 @@ module.exports = {
},
cachingEnabled: false,
publicApiUrl: 'test-public-api-url',
datadogApiKey: 'test-datadog-api-key',
datadogAppKey: 'test-datadog-app-key',
};
Original file line number Diff line number Diff line change
Expand Up @@ -1031,6 +1031,10 @@ exports[`non-tests to document the State Machines - qc production with specific
"JobQueue": "queue-pipeline-production",
"ContainerOverrides": {
"Environment": [
{
"Name": "EXPERIMENT_ID",
"Value": "mock-experiment-id"
},
{
"Name": "ACTIVITY_ARN",
"Value": "arn:aws:states:eu-west-1:28592648592:activity:biomage-qc-production-39249897-cfce-402b-a617-e58fbf251713"
Expand Down Expand Up @@ -1060,8 +1064,12 @@ exports[`non-tests to document the State Machines - qc production with specific
"Value": "scp.biomage.net"
},
{
"Name": "EXPERIMENT_ID",
"Value": "mock-experiment-id"
"Name": "DD_API_KEY",
"Value": "test-datadog-api-key"
},
{
"Name": "DD_APP_KEY",
"Value": "test-datadog-app-key"
}
],
"ResourceRequirements": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ Object {
"https://elabjournal.com",
"https://localhost:5000",
],
"datadogApiKey": "",
"datadogAppKey": "",
"domainName": "localhost:5000",
"emailDomainName": "https://localhost:5000",
"pipelineInstanceConfigUrl": "https://raw.githubusercontent.com/biomage-org/releases/master/production/pipeline.yaml",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ Object {
"https://elabjournal.com",
"https://ui-mockedSandboxId.scp-staging.biomage.net",
],
"datadogApiKey": "",
"datadogAppKey": "",
"domainName": "scp-staging.biomage.net",
"emailDomainName": "https://ui-mockedSandboxId.scp-staging.biomage.net",
"pipelineInstanceConfigUrl": "https://raw.githubusercontent.com/biomage-org/releases/master/staging/mockedSandboxId.yaml",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ Object {
"https://elabjournal.com",
"https://ui-default.scp-staging.biomage.net",
],
"datadogApiKey": "",
"datadogAppKey": "",
"domainName": "scp-staging.biomage.net",
"emailDomainName": "https://ui-default.scp-staging.biomage.net",
"pipelineInstanceConfigUrl": "https://raw.githubusercontent.com/biomage-org/releases/master/staging/pipeline.yaml",
Expand Down

0 comments on commit b757271

Please sign in to comment.