From 3aa090ecaae7cda8b6d45b7ed2f1a1e86ca604f8 Mon Sep 17 00:00:00 2001 From: Nicholas Duffy Date: Fri, 3 Apr 2020 08:29:36 -0600 Subject: [PATCH] chore(benchmarks): Add BENCHMARK_ prefix to benchmark env variables (#22779) * Add BENCHMARK_ prefix to benchmark env variables * Update example envs with BENCHMARK prefix * Update Contentful envs in setup --- benchmarks/source-contentful/.env.example | 6 +++--- benchmarks/source-contentful/bin/setup.js | 4 ++-- benchmarks/source-contentful/gatsby-config.js | 6 +++--- benchmarks/source-datocms/.env.example | 2 +- benchmarks/source-datocms/gatsby-config.js | 2 +- benchmarks/source-drupal/.env.example | 2 +- benchmarks/source-drupal/gatsby-config.js | 2 +- benchmarks/source-wordpress/gatsby-config.js | 2 +- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/benchmarks/source-contentful/.env.example b/benchmarks/source-contentful/.env.example index d83d0454cea58..fbb49753732fc 100644 --- a/benchmarks/source-contentful/.env.example +++ b/benchmarks/source-contentful/.env.example @@ -6,8 +6,8 @@ BENCHMARK_DATASOURCE_LOCAL_PATH='/path/to/benchmark/_dataset BENCHMARK_SITE_ID='site1' # Required for `yarn setup` script only -CONTENTFUL_MANAGEMENT_TOKEN='' +BENCHMARK_CONTENTFUL_MANAGEMENT_TOKEN='' # Required for `yarn build` -CONTENTFUL_SPACE_ID='' -CONTENTFUL_ACCESS_TOKEN='' +BENCHMARK_CONTENTFUL_SPACE_ID='' +BENCHMARK_CONTENTFUL_ACCESS_TOKEN='' diff --git a/benchmarks/source-contentful/bin/setup.js b/benchmarks/source-contentful/bin/setup.js index a40b3ac0d046a..e53e762865da5 100644 --- a/benchmarks/source-contentful/bin/setup.js +++ b/benchmarks/source-contentful/bin/setup.js @@ -22,8 +22,8 @@ if (!fs.existsSync(inputDir)) { const locale = `en-US` const contentfulConfig = { - spaceId: process.env.CONTENTFUL_SPACE_ID, - managementToken: process.env.CONTENTFUL_MANAGEMENT_TOKEN, + spaceId: process.env.BENCHMARK_CONTENTFUL_SPACE_ID, + managementToken: process.env.BENCHMARK_CONTENTFUL_MANAGEMENT_TOKEN, } const { spaceId, managementToken } = contentfulConfig diff --git a/benchmarks/source-contentful/gatsby-config.js b/benchmarks/source-contentful/gatsby-config.js index 530050cecec49..48fbd09328278 100644 --- a/benchmarks/source-contentful/gatsby-config.js +++ b/benchmarks/source-contentful/gatsby-config.js @@ -3,9 +3,9 @@ require("dotenv").config({ }) const contentfulConfig = { - spaceId: process.env.CONTENTFUL_SPACE_ID, - accessToken: process.env.CONTENTFUL_ACCESS_TOKEN, - host: process.env.CONTENTFUL_HOST, + spaceId: process.env.BENCHMARK_CONTENTFUL_SPACE_ID, + accessToken: process.env.BENCHMARK_CONTENTFUL_ACCESS_TOKEN, + host: process.env.BENCHMARK_CONTENTFUL_HOST, } const { spaceId, accessToken } = contentfulConfig diff --git a/benchmarks/source-datocms/.env.example b/benchmarks/source-datocms/.env.example index 1726176720f23..8dce3eac7a1e3 100644 --- a/benchmarks/source-datocms/.env.example +++ b/benchmarks/source-datocms/.env.example @@ -1 +1 @@ -DATOCMS_API_TOKEN= +BENCHMARK_DATOCMS_API_TOKEN= diff --git a/benchmarks/source-datocms/gatsby-config.js b/benchmarks/source-datocms/gatsby-config.js index bb7c6fb9ca678..e5bf888009abe 100644 --- a/benchmarks/source-datocms/gatsby-config.js +++ b/benchmarks/source-datocms/gatsby-config.js @@ -20,7 +20,7 @@ module.exports = { { resolve: `gatsby-source-datocms`, options: { - apiToken: process.env.DATOCMS_API_TOKEN, + apiToken: process.env.BENCHMARK_DATOCMS_API_TOKEN, previewMode: false, disableLiveReload: false, apiUrl: `https://site-api.datocms.com`, diff --git a/benchmarks/source-drupal/.env.example b/benchmarks/source-drupal/.env.example index c8c55ff9498fc..f5bf0e2680199 100644 --- a/benchmarks/source-drupal/.env.example +++ b/benchmarks/source-drupal/.env.example @@ -1 +1 @@ -GATSBY_DRUPAL_BASE_URL= +BENCHMARK_DRUPAL_BASE_URL= diff --git a/benchmarks/source-drupal/gatsby-config.js b/benchmarks/source-drupal/gatsby-config.js index fab5de18677e9..a4f30d1c6c82c 100644 --- a/benchmarks/source-drupal/gatsby-config.js +++ b/benchmarks/source-drupal/gatsby-config.js @@ -20,7 +20,7 @@ module.exports = { { resolve: `gatsby-source-drupal`, options: { - baseUrl: process.env.GATSBY_DRUPAL_BASE_URL, + baseUrl: process.env.BENCHMARK_DRUPAL_BASE_URL, // Auth needed for POST }, }, diff --git a/benchmarks/source-wordpress/gatsby-config.js b/benchmarks/source-wordpress/gatsby-config.js index 97d4765e28e69..525ca36d03827 100644 --- a/benchmarks/source-wordpress/gatsby-config.js +++ b/benchmarks/source-wordpress/gatsby-config.js @@ -20,7 +20,7 @@ module.exports = { { resolve: `gatsby-source-wordpress-experimental`, options: { - url: process.env.WPGRAPHQL_URL, + url: process.env.BENCHMARK_WPGRAPHQL_URL, type: { Post: { limit: process.env.NODE_ENV === `development` ? 50 : false,