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

Add prepare script to allow CI to skip build #2080

Merged
merged 3 commits into from
Nov 21, 2020

Conversation

thornbill
Copy link
Member

Changes

  • Adds a prepare script that allows the build on install to be skipped by setting a SKIP_PREPARE environment variable
  • Removes condition that skips install if cache is hit

Issues
🤞 hopefully the recent CI build failures

@thornbill
Copy link
Member Author

thornbill commented Nov 18, 2020

Current approach:

Skips yarn install if node_modules exists. This seems to be having issues where node_modules exists but not all dependencies are available for some reason which causes CI failures.

This approach:

Always runs yarn install which should be very fast ~1s when all packages are current. But we have a prepare script defined to run a production build on install this is required to support installing an npm package from a git repository. In order to avoid calling the build during the prepare step, I added a small bash script that checks if a SKIP_PREPARE environment variable has been set.

Alternatives:

  • Include the --ignore-scripts parameter when calling yarn install
  • Remove the prepare script entirely
    • Cons: Breaks the ability to install jellyfin-web via the git repository as a dependency in a separate project. Maybe this doesn't matter though since we are moving away from bundled clients?

scripts/prepare.sh Outdated Show resolved Hide resolved
@dkanada dkanada merged commit 6fa7e82 into jellyfin:master Nov 21, 2020
@sonarcloud
Copy link

sonarcloud bot commented Nov 21, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
4.2% 4.2% Duplication

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