GitLab Pages: Gatsby project template pipeline failing at pages deploy stage
Summary
When creating GitLab Pages project from Gatsby template, ci pipeline fails at deploy pages stage with below error.
success write out requires - 0.003s
success write out redirect data - 0.001s
Segmentation fault (core dumped)
Cleaning up project directory and file based variables
ERROR: Job failed: exit code 139
Steps to reproduce
- Create
new project/repository
and selectcreate from template
- Goto
Pages/Gatsby
and clickuse template
. Enter required details and click oncreate project
. - Once project is imported, navigate to
build
>pipelines
and click onrun pipeline
>run pipeline
. - Wait for pipeline jobs to complete.
-
Stage:deploy
fails for pages with above error logs.
Example Project
https://gitlab.com/ngala/ngala-gatsby-2/-/jobs/6147779280
What is the current bug behavior?
Gatsby project template pipeline failing at pages deploy stage. GItLab pages url is not accessible.
What is the expected correct behavior?
Gatsby project template pipeline should succeed at pages deploy stage. GItLab pages url should be accessible.
Relevant logs and/or screenshots
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: \\\\\\\\\\\\\\\`sudo gitlab-rake gitlab:env:info\\\\\\\\\\\\\\\`) (For installations from source run and paste the output of: \\\\\\\\\\\\\\\`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production\\\\\\\\\\\\\\\`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of: \\\\\\\`sudo gitlab-rake gitlab:check SANITIZE=true\\\\\\\`) (For installations from source run and paste the output of: \\\\\\\`sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true\\\\\\\`) (we will only investigate if the tests are passing)
Possible fixes
Instant fix: Update the projects .gitlab-ci.yml
template to use image: node:10-alpine
instead of image: node:lts-alpine
.
We have to update Gatsby project template to include above ci change. Refer documentation: https://docs.gitlab.com/ee/development/project_templates.html
Edited by Naman Jagdish Gala