Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Add benchmarks and environment variables for CMS sources #22893

Merged
merged 6 commits into from
Apr 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
210 changes: 205 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,16 @@ commands:
environment:
NUM_PAGES: << parameters.NUM_PAGES >>
- run:
name: Set environment variables
working_directory: << parameters.working_directory >>
command: |
echo -e "BENCHMARK_DRUPAL_BASE_URL=$BENCHMARK_DRUPAL_<< parameters.NUM_PAGES >>_BASE_URL\n
BENCHMARK_WPGRAPHQL_URL=$BENCHMARK_WPGRAPHQL_<< parameters.NUM_PAGES >>_URL\n
BENCHMARK_CONTENTFUL_SPACE_ID=$BENCHMARK_CONTENTFUL_<< parameters.NUM_PAGES >>_SPACE_ID\n
BENCHMARK_CONTENTFUL_ACCESS_TOKEN=$BENCHMARK_CONTENTFUL_<< parameters.NUM_PAGES >>_ACCESS_TOKEN\n
BENCHMARK_DATOCMS_API_TOKEN=$BENCHMARK_DATOCMS_<< parameters.NUM_PAGES >>_API_TOKEN" >> .env.production
- run:
name: Build COLD_START
command: npm run build
working_directory: << parameters.working_directory >>
environment:
Expand All @@ -165,12 +175,9 @@ commands:
BENCHMARK_SITE_TYPE: << parameters.BENCHMARK_SITE_TYPE >>
BENCHMARK_BRANCH: << parameters.BENCHMARK_BRANCH >>
CI_NAME: circleci
GATSBY_CPU_COUNT: 2
- run:
command: npm install
working_directory: << parameters.working_directory >>
environment:
NUM_PAGES: << parameters.NUM_PAGES >>
- run:
name: Build WARM_START
command: npm run build
working_directory: << parameters.working_directory >>
environment:
Expand All @@ -181,6 +188,7 @@ commands:
BENCHMARK_SITE_TYPE: << parameters.BENCHMARK_SITE_TYPE >>
BENCHMARK_BRANCH: << parameters.BENCHMARK_BRANCH >>
CI_NAME: circleci
GATSBY_CPU_COUNT: 2

e2e-test:
parameters:
Expand Down Expand Up @@ -615,6 +623,182 @@ jobs:
BENCHMARK_REPO_NAME: gatsbyjs/gatsby/benchmarks/mdx
BENCHMARK_SITE_TYPE: BLOG

benchmark_contentful_512:
docker:
- image: "circleci/node:12"
steps:
- run-benchmark:
working_directory: benchmarks/source-contentful
NUM_PAGES: "512"
BENCHMARK_CONTENT_SOURCE: CONTENTFUL
BENCHMARK_REPO_NAME: gatsbyjs/gatsby/benchmarks/source-contentful
BENCHMARK_SITE_TYPE: BLOG

benchmark_contentful_4096:
docker:
- image: "circleci/node:12"
steps:
- run-benchmark:
working_directory: benchmarks/source-contentful
NUM_PAGES: "4096"
BENCHMARK_CONTENT_SOURCE: CONTENTFUL
BENCHMARK_REPO_NAME: gatsbyjs/gatsby/benchmarks/source-contentful
BENCHMARK_SITE_TYPE: BLOG

benchmark_contentful_8192:
docker:
- image: "circleci/node:12"
steps:
- run-benchmark:
working_directory: benchmarks/source-contentful
NUM_PAGES: "8192"
BENCHMARK_CONTENT_SOURCE: CONTENTFUL
BENCHMARK_REPO_NAME: gatsbyjs/gatsby/benchmarks/source-contentful
BENCHMARK_SITE_TYPE: BLOG

benchmark_contentful_32768:
docker:
- image: "circleci/node:12"
steps:
- run-benchmark:
working_directory: benchmarks/source-contentful
NUM_PAGES: "32768"
BENCHMARK_CONTENT_SOURCE: CONTENTFUL
BENCHMARK_REPO_NAME: gatsbyjs/gatsby/benchmarks/source-contentful
BENCHMARK_SITE_TYPE: BLOG

benchmark_datocms_512:
docker:
- image: "circleci/node:12"
steps:
- run-benchmark:
working_directory: benchmarks/source-datocms
NUM_PAGES: "512"
BENCHMARK_CONTENT_SOURCE: DATOCMS
BENCHMARK_REPO_NAME: gatsbyjs/gatsby/benchmarks/source-datocms
BENCHMARK_SITE_TYPE: BLOG

benchmark_datocms_4096:
docker:
- image: "circleci/node:12"
steps:
- run-benchmark:
working_directory: benchmarks/source-datocms
NUM_PAGES: "4096"
BENCHMARK_CONTENT_SOURCE: DATOCMS
BENCHMARK_REPO_NAME: gatsbyjs/gatsby/benchmarks/source-datocms
BENCHMARK_SITE_TYPE: BLOG

benchmark_datocms_8192:
docker:
- image: "circleci/node:12"
steps:
- run-benchmark:
working_directory: benchmarks/source-datocms
NUM_PAGES: "8192"
BENCHMARK_CONTENT_SOURCE: DATOCMS
BENCHMARK_REPO_NAME: gatsbyjs/gatsby/benchmarks/source-datocms
BENCHMARK_SITE_TYPE: BLOG

benchmark_datocms_32768:
docker:
- image: "circleci/node:12"
steps:
- run-benchmark:
working_directory: benchmarks/source-datocms
NUM_PAGES: "32768"
BENCHMARK_CONTENT_SOURCE: DATOCMS
BENCHMARK_REPO_NAME: gatsbyjs/gatsby/benchmarks/source-datocms
BENCHMARK_SITE_TYPE: BLOG

benchmark_drupal_512:
docker:
- image: "circleci/node:12"
steps:
- run-benchmark:
working_directory: benchmarks/source-drupal
NUM_PAGES: "512"
BENCHMARK_CONTENT_SOURCE: DRUPAL
BENCHMARK_REPO_NAME: gatsbyjs/gatsby/benchmarks/source-drupal
BENCHMARK_SITE_TYPE: BLOG

benchmark_drupal_4096:
docker:
- image: "circleci/node:12"
steps:
- run-benchmark:
working_directory: benchmarks/source-drupal
NUM_PAGES: "4096"
BENCHMARK_CONTENT_SOURCE: DRUPAL
BENCHMARK_REPO_NAME: gatsbyjs/gatsby/benchmarks/source-drupal
BENCHMARK_SITE_TYPE: BLOG

benchmark_drupal_8192:
docker:
- image: "circleci/node:12"
steps:
- run-benchmark:
working_directory: benchmarks/source-drupal
NUM_PAGES: "8192"
BENCHMARK_CONTENT_SOURCE: DRUPAL
BENCHMARK_REPO_NAME: gatsbyjs/gatsby/benchmarks/source-drupal
BENCHMARK_SITE_TYPE: BLOG

benchmark_drupal_32768:
docker:
- image: "circleci/node:12"
steps:
- run-benchmark:
working_directory: benchmarks/source-drupal
NUM_PAGES: "32768"
BENCHMARK_CONTENT_SOURCE: DRUPAL
BENCHMARK_REPO_NAME: gatsbyjs/gatsby/benchmarks/source-drupal
BENCHMARK_SITE_TYPE: BLOG

benchmark_wordpress_512:
docker:
- image: "circleci/node:12"
steps:
- run-benchmark:
working_directory: benchmarks/source-wordpress
NUM_PAGES: "512"
BENCHMARK_CONTENT_SOURCE: WORDPRESS
BENCHMARK_REPO_NAME: gatsbyjs/gatsby/benchmarks/source-wordpress
BENCHMARK_SITE_TYPE: BLOG

benchmark_wordpress_4096:
docker:
- image: "circleci/node:12"
steps:
- run-benchmark:
working_directory: benchmarks/source-wordpress
NUM_PAGES: "4096"
BENCHMARK_CONTENT_SOURCE: WORDPRESS
BENCHMARK_REPO_NAME: gatsbyjs/gatsby/benchmarks/source-wordpress
BENCHMARK_SITE_TYPE: BLOG

benchmark_wordpress_8192:
docker:
- image: "circleci/node:12"
steps:
- run-benchmark:
working_directory: benchmarks/source-wordpress
NUM_PAGES: "8192"
BENCHMARK_CONTENT_SOURCE: WORDPRESS
BENCHMARK_REPO_NAME: gatsbyjs/gatsby/benchmarks/source-wordpress
BENCHMARK_SITE_TYPE: BLOG

benchmark_wordpress_32768:
docker:
- image: "circleci/node:12"
steps:
- run-benchmark:
working_directory: benchmarks/source-wordpress
NUM_PAGES: "32768"
BENCHMARK_CONTENT_SOURCE: WORDPRESS
BENCHMARK_REPO_NAME: gatsbyjs/gatsby/benchmarks/source-wordpress
BENCHMARK_SITE_TYPE: BLOG

workflows:
version: 2

Expand All @@ -636,6 +820,22 @@ workflows:
- benchmark_mdx_4096
- benchmark_mdx_8192
- benchmark_mdx_32768
- benchmark_contentful_512
- benchmark_contentful_4096
- benchmark_contentful_8192
- benchmark_contentful_32768
- benchmark_datocms_512
- benchmark_datocms_4096
- benchmark_datocms_8192
- benchmark_datocms_32768
- benchmark_drupal_512
- benchmark_drupal_4096
- benchmark_drupal_8192
- benchmark_drupal_32768
- benchmark_wordpress_512
- benchmark_wordpress_4096
- benchmark_wordpress_8192
- benchmark_wordpress_32768
triggers:
- schedule:
cron: 22 16 * * *
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/source-wordpress/gatsby-config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require("dotenv").config({
path: `.env`,
path: `.env.${process.env.NODE_ENV}`,
})

module.exports = {
Expand Down