WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit f677157

Browse files
Add print promo url to environmental variable
1 parent 8e60567 commit f677157

File tree

10 files changed

+17
-1
lines changed

10 files changed

+17
-1
lines changed

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,4 @@ MEMBERS_DATA_API_URL=
3030
USER_BENEFITS_API_URL=
3131
DELETE_ACCOUNT_STEP_FUNCTION_URL=
3232
DELETE_ACCOUNT_STEP_FUNCTION_API_KEY=
33+
PRINT_PROMO_URL=

.github/workflows/cypress-ete.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ jobs:
9494
OAUTH_BASE_URL: https://oauth.code.dev-theguardian.com
9595
MEMBERS_DATA_API_URL: https://members-data-api.code.dev-theguardian.com
9696
USER_BENEFITS_API_URL: https://user-benefits.code.dev-guardianapis.com
97+
PRINT_PROMO_URL: http://printpromourl
9798
CYPRESS_SIGN_IN_PAGE_URL: https://profile.thegulocal.com/signin
9899
IS_HTTPS: true
99100
APP_SECRET: ${{ secrets.APP_SECRET }}

.github/workflows/cypress-mocked.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ jobs:
8484
OAUTH_BASE_URL: https://oauth.code.dev-theguardian.com
8585
MEMBERS_DATA_API_URL: http://localhost:9000
8686
USER_BENEFITS_API_URL: http://localhost:9000
87+
PRINT_PROMO_URL: http://localhost:9000
8788
CYPRESS_SIGN_IN_PAGE_URL: https://profile.thegulocal.com/signin
8889
IS_HTTPS: true
8990
APP_SECRET: devsecret

cdk/lib/__snapshots__/identity-gateway.test.ts.snap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,6 +1105,7 @@ while true; do
11051105
OKTA_IDP_GOOGLE=$(aws ssm get-parameter --name '/\${Stack}/\${App}/\${Stage}/oktaIdpGoogle' --with-decryption --region eu-west-1 --query="Parameter.Value" --output="text")
11061106
OKTA_GUARDIAN_USERS_ALL_GROUP_ID=$(aws ssm get-parameter --name '/\${Stack}/\${App}/\${Stage}/oktaGuardianUsersAllGroupId' --with-decryption --region eu-west-1 --query="Parameter.Value" --output="text")
11071107
USER_BENEFITS_API_URL=$(aws ssm get-parameter --name '/\${Stack}/\${App}/\${Stage}/user-benefits-api-url' --with-decryption --region eu-west-1 --query="Parameter.Value" --output="text")
1108+
PRINT_PROMO_URL=$(aws ssm get-parameter --name '/\${Stack}/\${App}/\${Stage}/print-promo-url' --with-decryption --region eu-west-1 --query="Parameter.Value" --output="text")
11081109
DELETE_ACCOUNT_STEP_FUNCTION_URL=$(aws ssm get-parameter --name '/\${Stack}/\${App}/\${Stage}/deleteAccountStepFunctionUrl' --with-decryption --region eu-west-1 --query="Parameter.Value" --output="text")
11091110
DELETE_ACCOUNT_STEP_FUNCTION_API_KEY=$(aws ssm get-parameter --name '/\${Stack}/\${App}/\${Stage}/deleteAccountStepFunctionApiKey' --with-decryption --region eu-west-1 --query="Parameter.Value" --output="text")
11101111
then break
@@ -1150,6 +1151,7 @@ Environment=REDIS_HOST=\${RedisHost}
11501151
Environment=REDIS_SSL_ON=true
11511152
Environment=MEMBERS_DATA_API_URL=\${MembersDataApiUrl}
11521153
Environment=USER_BENEFITS_API_URL=$USER_BENEFITS_API_URL
1154+
Environment=PRINT_PROMO_URL=$PRINT_PROMO_URL
11531155
Environment=DELETE_ACCOUNT_STEP_FUNCTION_URL=$DELETE_ACCOUNT_STEP_FUNCTION_URL
11541156
Environment=DELETE_ACCOUNT_STEP_FUNCTION_API_KEY=$DELETE_ACCOUNT_STEP_FUNCTION_API_KEY
11551157

cloudformation.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@ Resources:
304304
OKTA_IDP_GOOGLE=$(aws ssm get-parameter --name '/${Stack}/${App}/${Stage}/oktaIdpGoogle' --with-decryption --region eu-west-1 --query="Parameter.Value" --output="text")
305305
OKTA_GUARDIAN_USERS_ALL_GROUP_ID=$(aws ssm get-parameter --name '/${Stack}/${App}/${Stage}/oktaGuardianUsersAllGroupId' --with-decryption --region eu-west-1 --query="Parameter.Value" --output="text")
306306
USER_BENEFITS_API_URL=$(aws ssm get-parameter --name '/${Stack}/${App}/${Stage}/user-benefits-api-url' --with-decryption --region eu-west-1 --query="Parameter.Value" --output="text")
307+
PRINT_PROMO_URL=$(aws ssm get-parameter --name '/${Stack}/${App}/${Stage}/print-promo-url' --with-decryption --region eu-west-1 --query="Parameter.Value" --output="text")
307308
DELETE_ACCOUNT_STEP_FUNCTION_URL=$(aws ssm get-parameter --name '/${Stack}/${App}/${Stage}/deleteAccountStepFunctionUrl' --with-decryption --region eu-west-1 --query="Parameter.Value" --output="text")
308309
DELETE_ACCOUNT_STEP_FUNCTION_API_KEY=$(aws ssm get-parameter --name '/${Stack}/${App}/${Stage}/deleteAccountStepFunctionApiKey' --with-decryption --region eu-west-1 --query="Parameter.Value" --output="text")
309310
then break
@@ -349,6 +350,7 @@ Resources:
349350
Environment=REDIS_SSL_ON=true
350351
Environment=MEMBERS_DATA_API_URL=${MembersDataApiUrl}
351352
Environment=USER_BENEFITS_API_URL=$USER_BENEFITS_API_URL
353+
Environment=PRINT_PROMO_URL=$PRINT_PROMO_URL
352354
Environment=DELETE_ACCOUNT_STEP_FUNCTION_URL=$DELETE_ACCOUNT_STEP_FUNCTION_URL
353355
Environment=DELETE_ACCOUNT_STEP_FUNCTION_API_KEY=$DELETE_ACCOUNT_STEP_FUNCTION_API_KEY
354356

cypress-mocked.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ IS_HTTPS=true
1111
APP_SECRET=devsecret
1212
OKTA_ORG_URL=http://localhost:9000
1313
MEMBERS_DATA_API_URL=http://localhost:9000
14-
USER_BENEFITS_API_URL=http://localhost:9000
14+
PRINT_PROMO_URL=http://localhost:9000
1515
OKTA_API_TOKEN=oktatoken
1616
OKTA_CUSTOM_OAUTH_SERVER=oktaauthserverid
1717
OKTA_CLIENT_ID=oktaclientid

src/server/lib/__tests__/getConfiguration.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ describe('getConfiguration', () => {
4444
'okta-guardian-users-group-id';
4545
process.env.MEMBERS_DATA_API_URL = 'members-data-api-url';
4646
process.env.USER_BENEFITS_API_URL = 'user-benefits-api-url';
47+
process.env.PRINT_PROMO_URL = 'print-promo-url';
4748
process.env.DELETE_ACCOUNT_STEP_FUNCTION_URL =
4849
'delete-account-step-function-url';
4950
process.env.DELETE_ACCOUNT_STEP_FUNCTION_API_KEY = 'delete-account-api-key';

src/server/lib/__tests__/sharedConfig.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ const defaultEnv = {
2626
SIGN_IN_PAGE_URL: 'sign-in-page-url',
2727
MEMBERS_DATA_API_URL: 'members-data-api-url',
2828
USER_BENEFITS_API_URL: 'user-benefits-api-url',
29+
PRINT_PROMO_URL: 'print-promo-url',
2930
STAGE: 'DEV',
3031
IS_HTTPS: 'true',
3132
APP_SECRET: 'app-secret',

src/server/lib/getConfiguration.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,11 @@ export const getConfiguration = (): Configuration => {
168168
'User Benefits API URL missing.',
169169
);
170170

171+
const printPromoUrl = getOrThrow(
172+
process.env.PRINT_PROMO_URL,
173+
'Print Promo URL missing.',
174+
);
175+
171176
const okta: Okta = {
172177
enabled: true,
173178
orgUrl: getOrThrow(process.env.OKTA_ORG_URL, 'OKTA org URL missing'),
@@ -244,6 +249,7 @@ export const getConfiguration = (): Configuration => {
244249
rateLimiter,
245250
membersDataApiUrl,
246251
userBenefitsApiUrl,
252+
printPromoUrl,
247253
passcodesEnabled: passcodesEnabled,
248254
deleteAccountStepFunction,
249255
};

src/server/models/Configuration.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export interface Configuration {
2626
rateLimiter: RateLimiterConfiguration;
2727
membersDataApiUrl: string;
2828
userBenefitsApiUrl: string;
29+
printPromoUrl: string;
2930
passcodesEnabled: boolean;
3031
deleteAccountStepFunction: {
3132
url: string;

0 commit comments

Comments
 (0)