Skip to content

Conversation

cacieprins
Copy link
Contributor

The existing install script can exit with code 0 if the npm command fails, instead of failing. This can cause that docker layer to cache as successful even if it failed. To resolve, the intermediary node.js script is removed, as everything it does can be accomplished in a shell script. Some of the echos are removed, as the command itself should be visible in the docker logs - they are unnecessary.

@cacieprins cacieprins force-pushed the fix/cy-install-script-exit-code branch from 8772d11 to 28124cf Compare July 25, 2025 17:11
@MikeMcC399
Copy link
Collaborator

@cacieprins

I also saw this and I suggest just to put

set -e

at the top of

https://github.com/cypress-io/cypress-docker-images/blob/master/factory/installScripts/cypress/default.sh

The problem is that if the download fails, then it has already created the /root/.cache directory.

I already had a PR prepared for this, but didn't want to confuse things by submitting it right now!

The problem at the moment is actually the network between CircleCI and Cloudflare. I can build the image locally without any problem.

@MikeMcC399
Copy link
Collaborator

@cacieprins
Copy link
Contributor Author

@MikeMcC399 Thanks!

@MikeMcC399
Copy link
Collaborator

@cacieprins

I've submitted #1392 which is a simple fix for the incorrect error reporting.

If this PR succeeds (using 14.5.2) and the 14.5.3 PR fails, then it's likely to be caused by a Cloudflare issue.

@cacieprins
Copy link
Contributor Author

@MikeMcC399 I'd like to use this one, since it removes a fully redundant intermediary script.

@MikeMcC399
Copy link
Collaborator

@cacieprins

I will drop out now. It's up to you and the Cypress.io team to decide what to do.

@jennifer-shehane jennifer-shehane self-requested a review July 25, 2025 17:55
@cacieprins cacieprins merged commit 72a8704 into master Jul 25, 2025
49 checks passed
@cacieprins cacieprins deleted the fix/cy-install-script-exit-code branch July 25, 2025 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants