2 simple tricks to speedup your gcloud build of a gatsby website

torrito
1 min readOct 10, 2019

--

So we had some problems with our build and what we have is a gcloud build that runs mainly gatsby build.

I’ve spend 2 last days trying to first fix build timeouts and after that trying to speedup our build. And this is what we came to:

  1. we have had gatsby 2.13.64 and first we have updated it to the highest available 2.13.* version which is 2.13.83 right now. This helped us to fix an annoying build bug that prevented our build to finish after 40mins of running.
    This also let us cut build time from 1h 5m to something around 45m.
  2. after that we’ve switched to current node.js LTS version — which is 10.16.3 as of now — and this also impacted on the build time so that we came to something around 35–40m for a build.
    This is how you can choose which node version to use during gcloud build from https://github.com/GoogleCloudPlatform/cloud-builders/blob/master/npm/README.md:

And that’s it.
~35% build time cut FOR FREE =)

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

torrito
torrito

Written by torrito

UI developer / UX appreciator / latent DEsigner

No responses yet

Write a response