Skip to content

Commit

Permalink
DOP-4414 testing env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
anabellabuckvar committed Mar 25, 2024
1 parent bfb75a9 commit b48eff1
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion api/controllers/v2/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export const triggerSmokeTestAutomatedBuild = async (event: APIGatewayEvent): Pr
const db = client.db(c.get('dbName'));
const consoleLogger = new ConsoleLogger();
const jobRepository = new JobRepository(db, c, consoleLogger);
const projectsRepository = new ProjectsRepository(client.db('docs_metadata'), c, consoleLogger);
const projectsRepository = new ProjectsRepository(client.db(process.env.METADATA_DB_NAME), c, consoleLogger);
const repoBranchesRepository = new RepoBranchesRepository(db, c, consoleLogger);
const docsetsRepository = new DocsetsRepository(db, c, consoleLogger);

Expand Down
2 changes: 2 additions & 0 deletions infrastructure/ecs-main/ecs_service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ Resources:
Value: ${self:custom.repoBranchesCollection}
- Name: DOCSETS_COL_NAME
Value: ${self:custom.docsetsCollection}
- Name: PROJECTS_COL_NAME
Value: ${self:custom.projectsCollection}
- Name: NPM_BASE_64_AUTH
Value: ${self:custom.npmBase64Auth}
- Name: NPM_EMAIL
Expand Down
2 changes: 2 additions & 0 deletions serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ custom:
entitlementCollection: ${ssm:/env/${self:provider.stage}/docs/worker_pool/atlas/collections/user/entitlements}
repoBranchesCollection: ${ssm:/env/${self:provider.stage}/docs/worker_pool/atlas/collections/repo}
docsetsCollection: ${ssm:/env/${self:provider.stage}/docs/worker_pool/atlas/collections/docsets}
projectsCollection: ${ssm:/env/${self:provider.stage}/docs/worker_pool/atlas/collections/projects}
githubSecret: ${ssm:/env/${self:provider.stage}/docs/worker_pool/github/webhook/secret}
githubDeletionSecret: ${ssm:/env/${self:provider.stage}/docs/worker_pool/github/webhook/deletionSecret}
githubBotPW: ${ssm:/env/${self:provider.stage}/docs/worker_pool/github/bot/password}
Expand Down Expand Up @@ -110,6 +111,7 @@ webhook-env-core: &webhook-env-core
GITHUB_BOT_PASSWORD: ${self:custom.githubBotPW}
REPO_BRANCHES_COL_NAME: ${self:custom.repoBranchesCollection}
DOCSETS_COL_NAME: ${self:custom.docsetsCollection}
PROJECTS_COL_NAME: ${self:custom.projectsCollection}
SLACK_SECRET: ${self:custom.slackSecret}
SLACK_TOKEN: ${self:custom.slackAuthToken}
SNOOTY_SECRET: ${self:custom.snootySecret}
Expand Down
2 changes: 1 addition & 1 deletion src/repositories/projectsRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { ILogger } from '../services/logger';

//Project information from docs_metadata.projects for parser builds.

const projectsCollectionName = process.env.PROJECTS_COL_NAME || 'projects';
const projectsCollectionName = process.env.PROJECTS_COL_NAME || '';

export class ProjectsRepository extends BaseRepository {
constructor(db: mongodb.Db, config: IConfig, logger: ILogger) {
Expand Down

0 comments on commit b48eff1

Please sign in to comment.