From 1f45d927be25ea1118c94ee9211f3140e74c4161 Mon Sep 17 00:00:00 2001 From: louisearchibald Date: Thu, 28 Nov 2024 14:28:20 +0000 Subject: [PATCH 01/11] rename file from preview to preview1 --- envConfig/{preview.env => preview1.env} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename envConfig/{preview.env => preview1.env} (100%) diff --git a/envConfig/preview.env b/envConfig/preview1.env similarity index 100% rename from envConfig/preview.env rename to envConfig/preview1.env From 636b1fe37af69041a6ec5849bf4b81478e46ce1b Mon Sep 17 00:00:00 2001 From: louisearchibald Date: Thu, 28 Nov 2024 14:35:27 +0000 Subject: [PATCH 02/11] amend simorgh public static assets paths to reflect preview1 rename --- envConfig/preview1.env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/envConfig/preview1.env b/envConfig/preview1.env index ff6f34cd395..420f34b25d6 100644 --- a/envConfig/preview1.env +++ b/envConfig/preview1.env @@ -1,7 +1,7 @@ ## NB only variables prefixed with SIMORGH_ are available on both the server and client SIMORGH_BASE_URL=https://www.test.bbc.com SIMORGH_PUBLIC_STATIC_ASSETS_ORIGIN=https://static.test.files.bbci.co.uk -SIMORGH_PUBLIC_STATIC_ASSETS_PATH=/ws/simorgh-preview-assets/public/ +SIMORGH_PUBLIC_STATIC_ASSETS_PATH=/ws/simorgh-preview1-assets/public/ SIMORGH_ATI_BASE_URL=https://logws1363.ati-host.net? SIMORGH_CONFIG_URL=https://config.test.api.bbci.co.uk/ SIMORGH_INCLUDES_BASE_URL=https://www.test.bbc.com/ws/includes From 44b0d58966255c082c58c2afc8adb9f5136da253 Mon Sep 17 00:00:00 2001 From: louisearchibald Date: Thu, 28 Nov 2024 14:38:26 +0000 Subject: [PATCH 03/11] update preview build script to preview1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8c39533663d..b5079e0731d 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "build:profile": "rm -rf build && cp envConfig/local.env .env && IS_PROD_PROFILE=true NODE_ENV=production webpack", "build:live": "cp envConfig/live.env .env && NODE_ENV=production webpack", "build:live:debug": "rm -rf build && awk '{sub(/LOG_DIR=.+/,\"LOG_DIR='log'\")}1' envConfig/live.env > .env && NODE_ENV=production webpack", - "build:preview": "cp envConfig/preview.env .env && NODE_ENV=production webpack", + "build:preview1": "cp envConfig/preview1.env .env && NODE_ENV=production webpack", "build:storybook": "yarn build && node .storybook/buildFontPreloads && storybook build -c .storybook -o storybook_dist", "build:test": "cp envConfig/test.env .env && NODE_ENV=production webpack", "build:test:debug": "rm -rf build && awk '{sub(/LOG_DIR=.+/,\"LOG_DIR='log'\")}1' envConfig/test.env > .env && NODE_ENV=production webpack", From 87aa46d90853a1a6a8badcb0d06503c44b0335f5 Mon Sep 17 00:00:00 2001 From: louisearchibald Date: Thu, 28 Nov 2024 14:41:38 +0000 Subject: [PATCH 04/11] create a .env file for preview2 --- envConfig/preview2.env | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 envConfig/preview2.env diff --git a/envConfig/preview2.env b/envConfig/preview2.env new file mode 100644 index 00000000000..49104e7373c --- /dev/null +++ b/envConfig/preview2.env @@ -0,0 +1,32 @@ +## NB only variables prefixed with SIMORGH_ are available on both the server and client +SIMORGH_BASE_URL=https://www.test.bbc.com +SIMORGH_PUBLIC_STATIC_ASSETS_ORIGIN=https://static.test.files.bbci.co.uk +SIMORGH_PUBLIC_STATIC_ASSETS_PATH=/ws/simorgh-preview2-assets/public/ +SIMORGH_ATI_BASE_URL=https://logws1363.ati-host.net? +SIMORGH_CONFIG_URL=https://config.test.api.bbci.co.uk/ +SIMORGH_INCLUDES_BASE_URL=https://www.test.bbc.com/ws/includes +SIMORGH_INCLUDES_BASE_AMP_URL=https://news.test.files.bbci.co.uk +SIMORGH_ICHEF_BASE_URL=https://ichef.test.bbci.co.uk +LOG_DIR='/var/log/simorgh' +LOG_LEVEL='debug' +LOG_TO_CONSOLE=false +SIMORGH_APP_ENV=test +SIMORGH_CONFIG_CACHE_ITEMS=400 +SIMORGH_CONFIG_CACHE_MAX_AGE_SECONDS=300 +SIMORGH_CONFIG_TIMEOUT_SECONDS=1 +SERVER_KEEP_ALIVE_TIMEOUT=61000 +SERVER_HEADERS_TIMEOUT=65000 +SIMORGH_MOST_READ_CDN_URL=https://web-cdn.test.api.bbci.co.uk + +## CW Custom Metrics Configuration +AWS_EMF_SERVICE_NAME=Simorgh +AWS_EMF_LOG_GROUP_NAME=SimorghServer +AWS_EMF_ENVIRONMENT=EC2 + +## WebVitals Reporting +SIMORGH_WEBVITALS_REPORTING_ENDPOINT=https://ws.bbc-reporting-api.app/report-endpoint +SIMORGH_WEBVITALS_DEFAULT_SAMPLING_RATE=100 + +SIMORGH_CSP_REPORTING_ENDPOINT=https://ws.bbc-reporting-api.app/report-endpoint + +SIMORGH_OPTIMIZELY_SDK_KEY=LptPKDnHyAFu9V12s5xCz From 211ffac1806c45538486ce1471feea65a062e625 Mon Sep 17 00:00:00 2001 From: louisearchibald Date: Thu, 28 Nov 2024 14:42:31 +0000 Subject: [PATCH 05/11] add a build script for preview2 --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index b5079e0731d..f4450d33437 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,7 @@ "build:live": "cp envConfig/live.env .env && NODE_ENV=production webpack", "build:live:debug": "rm -rf build && awk '{sub(/LOG_DIR=.+/,\"LOG_DIR='log'\")}1' envConfig/live.env > .env && NODE_ENV=production webpack", "build:preview1": "cp envConfig/preview1.env .env && NODE_ENV=production webpack", + "build:preview2": "cp envConfig/preview2.env .env && NODE_ENV=production webpack", "build:storybook": "yarn build && node .storybook/buildFontPreloads && storybook build -c .storybook -o storybook_dist", "build:test": "cp envConfig/test.env .env && NODE_ENV=production webpack", "build:test:debug": "rm -rf build && awk '{sub(/LOG_DIR=.+/,\"LOG_DIR='log'\")}1' envConfig/test.env > .env && NODE_ENV=production webpack", From bf31a65f2f7523d7f24b7bb4033165c1ba12e16b Mon Sep 17 00:00:00 2001 From: louisearchibald Date: Thu, 28 Nov 2024 15:30:44 +0000 Subject: [PATCH 06/11] move numbers to correct place in path --- envConfig/preview1.env | 2 +- envConfig/preview2.env | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/envConfig/preview1.env b/envConfig/preview1.env index 420f34b25d6..6c0c2c493e1 100644 --- a/envConfig/preview1.env +++ b/envConfig/preview1.env @@ -1,7 +1,7 @@ ## NB only variables prefixed with SIMORGH_ are available on both the server and client SIMORGH_BASE_URL=https://www.test.bbc.com SIMORGH_PUBLIC_STATIC_ASSETS_ORIGIN=https://static.test.files.bbci.co.uk -SIMORGH_PUBLIC_STATIC_ASSETS_PATH=/ws/simorgh-preview1-assets/public/ +SIMORGH_PUBLIC_STATIC_ASSETS_PATH=/ws/simorgh1-preview-assets/public/ SIMORGH_ATI_BASE_URL=https://logws1363.ati-host.net? SIMORGH_CONFIG_URL=https://config.test.api.bbci.co.uk/ SIMORGH_INCLUDES_BASE_URL=https://www.test.bbc.com/ws/includes diff --git a/envConfig/preview2.env b/envConfig/preview2.env index 49104e7373c..5d7459d6d07 100644 --- a/envConfig/preview2.env +++ b/envConfig/preview2.env @@ -1,7 +1,7 @@ ## NB only variables prefixed with SIMORGH_ are available on both the server and client SIMORGH_BASE_URL=https://www.test.bbc.com SIMORGH_PUBLIC_STATIC_ASSETS_ORIGIN=https://static.test.files.bbci.co.uk -SIMORGH_PUBLIC_STATIC_ASSETS_PATH=/ws/simorgh-preview2-assets/public/ +SIMORGH_PUBLIC_STATIC_ASSETS_PATH=/ws/simorgh2-preview-assets/public/ SIMORGH_ATI_BASE_URL=https://logws1363.ati-host.net? SIMORGH_CONFIG_URL=https://config.test.api.bbci.co.uk/ SIMORGH_INCLUDES_BASE_URL=https://www.test.bbc.com/ws/includes From 21355bdb2db20cb154e7977dbd047acbcafceb2b Mon Sep 17 00:00:00 2001 From: louisearchibald Date: Fri, 29 Nov 2024 12:58:52 +0000 Subject: [PATCH 07/11] test commit --- src/app/routes/utils/regex/utils/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/app/routes/utils/regex/utils/index.js b/src/app/routes/utils/regex/utils/index.js index 0c6077452df..804e58c3c2b 100644 --- a/src/app/routes/utils/regex/utils/index.js +++ b/src/app/routes/utils/regex/utils/index.js @@ -74,6 +74,8 @@ const homePageServices = [ 'yoruba', ]; +// test commit + export const getFrontPageRegex = services => { let frontPages = services; if (isLive()) { From 04cf1f84769dd9faf2bf0b0996984df61f5e9573 Mon Sep 17 00:00:00 2001 From: louisearchibald Date: Fri, 29 Nov 2024 13:00:23 +0000 Subject: [PATCH 08/11] Revert "test commit" This reverts commit 21355bdb2db20cb154e7977dbd047acbcafceb2b. --- src/app/routes/utils/regex/utils/index.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/app/routes/utils/regex/utils/index.js b/src/app/routes/utils/regex/utils/index.js index 804e58c3c2b..0c6077452df 100644 --- a/src/app/routes/utils/regex/utils/index.js +++ b/src/app/routes/utils/regex/utils/index.js @@ -74,8 +74,6 @@ const homePageServices = [ 'yoruba', ]; -// test commit - export const getFrontPageRegex = services => { let frontPages = services; if (isLive()) { From 05c2d337c06e2ac7b268b51c84eb3707833c6888 Mon Sep 17 00:00:00 2001 From: Andrew Bennett Date: Thu, 5 Dec 2024 15:33:28 +0000 Subject: [PATCH 09/11] Add backwards compatible preview command --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index f4450d33437..0a9c729ac48 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "build:profile": "rm -rf build && cp envConfig/local.env .env && IS_PROD_PROFILE=true NODE_ENV=production webpack", "build:live": "cp envConfig/live.env .env && NODE_ENV=production webpack", "build:live:debug": "rm -rf build && awk '{sub(/LOG_DIR=.+/,\"LOG_DIR='log'\")}1' envConfig/live.env > .env && NODE_ENV=production webpack", + "build:preview": "cp envConfig/preview1.env .env && NODE_ENV=production webpack", "build:preview1": "cp envConfig/preview1.env .env && NODE_ENV=production webpack", "build:preview2": "cp envConfig/preview2.env .env && NODE_ENV=production webpack", "build:storybook": "yarn build && node .storybook/buildFontPreloads && storybook build -c .storybook -o storybook_dist", From 567094bdae0768adc8e78029e203b5c316093d0e Mon Sep 17 00:00:00 2001 From: louisearchibald Date: Fri, 6 Dec 2024 10:52:40 +0000 Subject: [PATCH 10/11] updates build preview path for next app --- ws-nextjs-app/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ws-nextjs-app/package.json b/ws-nextjs-app/package.json index de916f1562b..355022e46d9 100644 --- a/ws-nextjs-app/package.json +++ b/ws-nextjs-app/package.json @@ -6,7 +6,7 @@ "setupDevEnv": "cp ../envConfig/local.env .env && mkdir -p public && cp -r ../public/. public", "moveStaticAssets": "mkdir -p build/standalone/ws-nextjs-app/public/_next/static && cp -r build/static/. build/standalone/ws-nextjs-app/public/_next/static", "build:local": "yarn setupDevEnv && NODE_ENV=production && next build && yarn moveStaticAssets", - "build:preview": "cp ../envConfig/preview.env .env && NODE_ENV=production && next build", + "build:preview": "cp ../envConfig/preview1.env .env && NODE_ENV=production && next build", "build:test": "cp ../envConfig/test.env .env && NODE_ENV=production && next build", "build:live": "cp ../envConfig/live.env .env && NODE_ENV=production && next build", "build": "yarn build:local", From 00a1e08da4a96d6591d2300d693fb52e62ef5344 Mon Sep 17 00:00:00 2001 From: louisearchibald Date: Fri, 6 Dec 2024 12:24:22 +0000 Subject: [PATCH 11/11] add preview1 & preview2 build preview scripts for next app --- ws-nextjs-app/package.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ws-nextjs-app/package.json b/ws-nextjs-app/package.json index 355022e46d9..952c3664342 100644 --- a/ws-nextjs-app/package.json +++ b/ws-nextjs-app/package.json @@ -7,6 +7,8 @@ "moveStaticAssets": "mkdir -p build/standalone/ws-nextjs-app/public/_next/static && cp -r build/static/. build/standalone/ws-nextjs-app/public/_next/static", "build:local": "yarn setupDevEnv && NODE_ENV=production && next build && yarn moveStaticAssets", "build:preview": "cp ../envConfig/preview1.env .env && NODE_ENV=production && next build", + "build:preview1": "cp ../envConfig/preview1.env .env && NODE_ENV=production && next build", + "build:preview2": "cp ../envConfig/preview2.env .env && NODE_ENV=production && next build", "build:test": "cp ../envConfig/test.env .env && NODE_ENV=production && next build", "build:live": "cp ../envConfig/live.env .env && NODE_ENV=production && next build", "build": "yarn build:local",