Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
gillkyle authored Apr 13, 2020
2 parents ed2feda + 41f1cc5 commit ae5d5cc
Show file tree
Hide file tree
Showing 193 changed files with 7,167 additions and 2,492 deletions.
264 changes: 17 additions & 247 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,58 +130,6 @@ commands:
- slack/status:
channel: eng-react-integration-status

run-benchmark:
parameters:
working_directory:
type: string
NUM_PAGES:
type: string
BENCHMARK_CONTENT_SOURCE:
type: string
BENCHMARK_REPO_NAME:
type: string
default: gatsbyjs/gatsby
BENCHMARK_SITE_TYPE:
type: string
default: BLOG
BENCHMARK_BRANCH:
type: string
default: master
steps:
- checkout
- run:
command: npm install
working_directory: << parameters.working_directory >>
environment:
NUM_PAGES: << parameters.NUM_PAGES >>
- run:
command: npm run build
working_directory: << parameters.working_directory >>
environment:
BENCHMARK_BUILD_TYPE: COLD_START
NUM_PAGES: << parameters.NUM_PAGES >>
BENCHMARK_CONTENT_SOURCE: << parameters.BENCHMARK_CONTENT_SOURCE >>
BENCHMARK_REPO_NAME: << parameters.BENCHMARK_REPO_NAME >>
BENCHMARK_SITE_TYPE: << parameters.BENCHMARK_SITE_TYPE >>
BENCHMARK_BRANCH: << parameters.BENCHMARK_BRANCH >>
CI_NAME: circleci
- run:
command: npm install
working_directory: << parameters.working_directory >>
environment:
NUM_PAGES: << parameters.NUM_PAGES >>
- run:
command: npm run build
working_directory: << parameters.working_directory >>
environment:
BENCHMARK_BUILD_TYPE: WARM_START
NUM_PAGES: << parameters.NUM_PAGES >>
BENCHMARK_CONTENT_SOURCE: << parameters.BENCHMARK_CONTENT_SOURCE >>
BENCHMARK_REPO_NAME: << parameters.BENCHMARK_REPO_NAME >>
BENCHMARK_SITE_TYPE: << parameters.BENCHMARK_SITE_TYPE >>
BENCHMARK_BRANCH: << parameters.BENCHMARK_BRANCH >>
CI_NAME: circleci

e2e-test:
parameters:
skip_file_change_test:
Expand Down Expand Up @@ -399,6 +347,19 @@ jobs:
command: yarn run update-source
working_directory: ~/project/scripts/i18n

sync_translation_repo:
executor: node
steps:
- checkout
- run: git config --global user.name "GatsbyJS Bot"
- run: git config --global user.email "core-team@gatsbyjs.com"
- run:
command: yarn
working_directory: ~/project/scripts/i18n
- run:
command: yarn run-all sync
working_directory: ~/project/scripts/i18n

windows_unit_tests:
executor:
name: win/vs2019
Expand Down Expand Up @@ -439,210 +400,19 @@ jobs:
paths:
- "*"

benchmark_markdown_id_512:
docker:
- image: "circleci/node:12"
steps:
- run-benchmark:
working_directory: benchmarks/markdown_id
NUM_PAGES: "512"
BENCHMARK_CONTENT_SOURCE: MARKDOWN
BENCHMARK_REPO_NAME: gatsbyjs/gatsby/benchmarks/markdown_id
BENCHMARK_SITE_TYPE: BLOG

benchmark_markdown_id_4096:
docker:
- image: "circleci/node:12"
steps:
- run-benchmark:
working_directory: benchmarks/markdown_id
NUM_PAGES: "4096"
BENCHMARK_CONTENT_SOURCE: MARKDOWN
BENCHMARK_REPO_NAME: gatsbyjs/gatsby/benchmarks/markdown_id
BENCHMARK_SITE_TYPE: BLOG

benchmark_markdown_id_8192:
docker:
- image: "circleci/node:12"
steps:
- run-benchmark:
working_directory: benchmarks/markdown_id
NUM_PAGES: "8192"
BENCHMARK_CONTENT_SOURCE: MARKDOWN
BENCHMARK_REPO_NAME: gatsbyjs/gatsby/benchmarks/markdown_id
BENCHMARK_SITE_TYPE: BLOG

benchmark_markdown_id_32768:
docker:
- image: "circleci/node:12"
steps:
- run-benchmark:
working_directory: benchmarks/markdown_id
NUM_PAGES: "32768"
BENCHMARK_CONTENT_SOURCE: MARKDOWN
BENCHMARK_REPO_NAME: gatsbyjs/gatsby/benchmarks/markdown_id
BENCHMARK_SITE_TYPE: BLOG

benchmark_markdown_slug_512:
docker:
- image: "circleci/node:12"
steps:
- run-benchmark:
working_directory: benchmarks/markdown_slug
NUM_PAGES: "512"
BENCHMARK_CONTENT_SOURCE: MARKDOWN
BENCHMARK_REPO_NAME: gatsbyjs/gatsby/benchmarks/markdown_slug
BENCHMARK_SITE_TYPE: BLOG

benchmark_markdown_slug_4096:
docker:
- image: "circleci/node:12"
steps:
- run-benchmark:
working_directory: benchmarks/markdown_slug
NUM_PAGES: "4096"
BENCHMARK_CONTENT_SOURCE: MARKDOWN
BENCHMARK_REPO_NAME: gatsbyjs/gatsby/benchmarks/markdown_slug
BENCHMARK_SITE_TYPE: BLOG

benchmark_markdown_slug_8192:
docker:
- image: "circleci/node:12"
steps:
- run-benchmark:
working_directory: benchmarks/markdown_slug
NUM_PAGES: "8192"
BENCHMARK_CONTENT_SOURCE: MARKDOWN
BENCHMARK_REPO_NAME: gatsbyjs/gatsby/benchmarks/markdown_slug
BENCHMARK_SITE_TYPE: BLOG

benchmark_markdown_slug_32768:
docker:
- image: "circleci/node:12"
steps:
- run-benchmark:
working_directory: benchmarks/markdown_slug
NUM_PAGES: "32768"
BENCHMARK_CONTENT_SOURCE: MARKDOWN
BENCHMARK_REPO_NAME: gatsbyjs/gatsby/benchmarks/markdown_slug
BENCHMARK_SITE_TYPE: BLOG

benchmark_markdown_table_512:
docker:
- image: "circleci/node:12"
steps:
- run-benchmark:
working_directory: benchmarks/markdown_table
NUM_PAGES: "512"
BENCHMARK_CONTENT_SOURCE: MARKDOWN
BENCHMARK_REPO_NAME: gatsbyjs/gatsby/benchmarks/markdown_table
BENCHMARK_SITE_TYPE: BLOG

benchmark_markdown_table_4096:
docker:
- image: "circleci/node:12"
steps:
- run-benchmark:
working_directory: benchmarks/markdown_table
NUM_PAGES: "4096"
BENCHMARK_CONTENT_SOURCE: MARKDOWN
BENCHMARK_REPO_NAME: gatsbyjs/gatsby/benchmarks/markdown_table
BENCHMARK_SITE_TYPE: BLOG

benchmark_markdown_table_8192:
docker:
- image: "circleci/node:12"
steps:
- run-benchmark:
working_directory: benchmarks/markdown_table
NUM_PAGES: "8192"
BENCHMARK_CONTENT_SOURCE: MARKDOWN
BENCHMARK_REPO_NAME: gatsbyjs/gatsby/benchmarks/markdown_table
BENCHMARK_SITE_TYPE: BLOG

benchmark_markdown_table_32768:
docker:
- image: "circleci/node:12"
steps:
- run-benchmark:
working_directory: benchmarks/markdown_table
NUM_PAGES: "32768"
BENCHMARK_CONTENT_SOURCE: MARKDOWN
BENCHMARK_REPO_NAME: gatsbyjs/gatsby/benchmarks/markdown_table
BENCHMARK_SITE_TYPE: BLOG

benchmark_mdx_512:
docker:
- image: "circleci/node:12"
steps:
- run-benchmark:
working_directory: benchmarks/mdx
NUM_PAGES: "512"
BENCHMARK_CONTENT_SOURCE: MDX
BENCHMARK_REPO_NAME: gatsbyjs/gatsby/benchmarks/mdx
BENCHMARK_SITE_TYPE: BLOG

benchmark_mdx_4096:
docker:
- image: "circleci/node:12"
steps:
- run-benchmark:
working_directory: benchmarks/mdx
NUM_PAGES: "4096"
BENCHMARK_CONTENT_SOURCE: MDX
BENCHMARK_REPO_NAME: gatsbyjs/gatsby/benchmarks/mdx
BENCHMARK_SITE_TYPE: BLOG

benchmark_mdx_8192:
docker:
- image: "circleci/node:12"
steps:
- run-benchmark:
working_directory: benchmarks/mdx
NUM_PAGES: "8192"
BENCHMARK_CONTENT_SOURCE: MDX
BENCHMARK_REPO_NAME: gatsbyjs/gatsby/benchmarks/mdx
BENCHMARK_SITE_TYPE: BLOG

benchmark_mdx_32768:
docker:
- image: "circleci/node:12"
steps:
- run-benchmark:
working_directory: benchmarks/mdx
NUM_PAGES: "32768"
BENCHMARK_CONTENT_SOURCE: MDX
BENCHMARK_REPO_NAME: gatsbyjs/gatsby/benchmarks/mdx
BENCHMARK_SITE_TYPE: BLOG

workflows:
version: 2

benchmark:
jobs:
- benchmark_markdown_id_512
- benchmark_markdown_id_4096
- benchmark_markdown_id_8192
- benchmark_markdown_id_32768
- benchmark_markdown_slug_512
- benchmark_markdown_slug_4096
- benchmark_markdown_slug_8192
- benchmark_markdown_slug_32768
- benchmark_markdown_table_512
- benchmark_markdown_table_4096
- benchmark_markdown_table_8192
- benchmark_markdown_table_32768
- benchmark_mdx_512
- benchmark_mdx_4096
- benchmark_mdx_8192
- benchmark_mdx_32768
weekly-i18n-sync:
triggers:
- schedule:
cron: 22 16 * * *
cron: "0 1 * * 6"
filters:
branches:
only:
- master
jobs:
- sync_translation_repo

nightly-react-next:
triggers:
Expand Down
20 changes: 16 additions & 4 deletions benchmarks/source-contentful/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,28 @@ Those individual article pages and the homepage share a common "Layout" componen

## Setup Contentful benchmark site

1. TODO <Setup data source>
1. Setup will-it-build data source
2. Copy `.env.example` to `.env.development` and make sure all variables are set
3. Run `yarn setup`

Note that the script is idempotent, so you can re-run it on failures.

Also use `yarn setup --skip [N:number]` to skip first `N` articles
(for example articles created during a previous run)
(for example articles created during a previous run which failed)

### Fixing broken images

Sometimes Contentful silently fails to process images which causes builds to fail.
Use following approach to fix those:

1. Run `yarn site find-broken-images`
2. Change image URLs in will-it-build dataset for this site to some other images
(or just use one of the larger sites and set `BENCHMARK_SITE_ID` appropriately)
3. Run `yarn site fix-broken-images imageid1 imageid2 imageid3`
This command updates broken images with images from the `BENCHMARK_SITE_ID` dataset

## Build a site

1. Copy `.env.example` to `.env.production` and make sure all variables are set
2. Run `yarn build`
1. Copy `.env.example` to `.env.production`
2. Set `BENCHMARK_CONTENTFUL_SPACE_ID` and `BENCHMARK_CONTENTFUL_ACCESS_TOKEN` variables
3. Run `yarn build`
Loading

0 comments on commit ae5d5cc

Please sign in to comment.