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

Issues with Gatsby deployment after dependency upgrades via PR for jenkins-infra/stories #4461

Open
krisstern opened this issue Dec 18, 2024 · 2 comments
Labels
infra.ci.jenkins.io Other triage Incoming issues that need review

Comments

@krisstern
Copy link
Member

Service(s)

infra.ci.jenkins.io, Other

Summary

For the PR jenkins-infra/stories#79, we are experiencing some Gatsby deployment issues as shown in https://ci.jenkins.io/job/Websites/job/stories/job/PR-79/15/console where we see the following in the stack trace:

00:36:44    NestedError: Cannot copy from `.cache/.eslintrc.json` to `/opt/build/cache/cwd  /.cache/.eslintrc.json`: Cannot create directory `/opt/build/cache/cwd/.cache`  : EACCES: permission denied, mkdir '/opt/build'
00:36:44    
00:36:44    - index.js:274 pMap.concurrency.concurrency
00:36:44      [adapters]/[cpy]/index.js:274:12
00:36:44    
00:36:44    - index.js:141 
00:36:44      [adapters]/[p-map]/index.js:141:20
00:36:44    
00:36:44    - Caused By: NestedError: Cannot create directory `/opt/build/cache/cwd/.cache    `: EACCES: permission denied, mkdir '/opt/build'
00:36:44    
00:36:44    - fs.js:61 
00:36:44      [adapters]/[cp-file]/fs.js:61:8
00:36:44    
00:36:44    - index.js:15 async cpFileAsync
00:36:44      [adapters]/[cp-file]/index.js:15:2
00:36:44    
00:36:44    - index.js:269 async pMap.concurrency.concurrency
00:36:44      [adapters]/[cpy]/index.js:269:6
00:36:44    
00:36:44    - index.js:141 
00:36:44      [adapters]/[p-map]/index.js:141:20
00:36:44    
00:36:44    - Caused By: Error: EACCES: permission denied, mkdir '/opt/build'
00:36:44    
00:36:44  
00:36:44  [Pipeline] }
00:36:44  [Pipeline] // withEnv
00:36:44  [Pipeline] }
00:36:44  [Pipeline] // stage
00:36:44  [Pipeline] stage
00:36:44  [Pipeline] { (Deploy PR to preview site)
00:36:45  Stage "Deploy PR to preview site" skipped due to earlier failure(s)
00:36:45  [Pipeline] getContext
00:36:45  [Pipeline] }
00:36:45  [Pipeline] // stage
00:36:45  [Pipeline] stage
00:36:45  [Pipeline] { (Build Production)
00:36:46  Stage "Build Production" skipped due to earlier failure(s)
00:36:46  [Pipeline] getContext
00:36:46  [Pipeline] }
00:36:46  [Pipeline] // stage
00:36:46  [Pipeline] stage
00:36:46  [Pipeline] { (Deploy Production)
00:36:47  Stage "Deploy Production" skipped due to earlier failure(s)
00:36:47  [Pipeline] getContext
00:36:47  [Pipeline] }
00:36:47  [Pipeline] // stage
00:36:47  [Pipeline] }
00:36:47  
00:36:47  [Pipeline] // ansiColor
00:36:47  [Pipeline] }
00:36:47  [Pipeline] // timeout
00:36:47  [Pipeline] }
00:36:48  [Pipeline] // withEnv
00:36:48  [Pipeline] }
00:36:48  [Pipeline] // withEnv
00:36:48  [Pipeline] }
00:36:48  [Pipeline] // node
00:36:48  [Pipeline] End of Pipeline
00:36:48  ERROR: script returned exit code 1

We have checked there does not seem to be any problem with the build step, which seems to suggest the issue is purely Gatsby deployment related as discussed in https://community.cloudflare.com/t/gatsby-pages-deployment-error/558278/6.

We would appreciate if someone could take a look and let us know if anything could be done to resolve this.

Reproduction steps

Cannot reproduce the failure with the following steps carried out locally:

  1. npm run build
  2. npm run serve
@dduportal
Copy link
Contributor

dduportal commented Dec 18, 2024

Quick note (while triaging this issue): the directory /opt/build does not seem a sane place for building temporarily a website.

I rings a bell but I can't recall the solution. I would check if there is an environment variable (maybe already set in the infra.ci pipeline) which allows setting an alternative directory

@krisstern
Copy link
Member Author

Sure, that sounds like a good idea!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infra.ci.jenkins.io Other triage Incoming issues that need review
Projects
None yet
Development

No branches or pull requests

2 participants