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

Use script to install node dependencies to benefit from custom cache handling #166

Merged
merged 1 commit into from
May 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ steps:
buildkite-agent artifact download "*\\RELEASES" .

echo "--- :node: Generating Release Manifest"
install_npm_packages
.buildkite/commands/install-node-dependencies.sh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The install_npm_packages is already a script that handles caching, defined in our a8c-ci-toolkit plugin.

Would it make sense to add the handling of patches/ in the CACHE_KEY… in the script from the plugin, so that other projects can benefit from it too? Or is the handling of patches/* and also what install-node-dependencies.sh does is too specific to studio to be worth fixing upstream too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It makes sense, but as four steps use custom install-node-dependencies.sh and two steps use a more generic command from upstream, I would prefer to fix it by using the consistent custom script now and bringing those changes to upstream separately if it benefits other projects that use that.

The number of changes is bigger than cache key handling e.g. one uses npm ci vs npm install.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IS_DEV_BUILD=true node ./scripts/generate-releases-manifest.mjs

echo "--- :fastlane: Distributing Dev Builds"
Expand Down Expand Up @@ -133,7 +133,7 @@ steps:
buildkite-agent artifact download "*\\RELEASES" .

echo "--- :node: Generating Release Manifest"
install_npm_packages
.buildkite/commands/install-node-dependencies.sh
node ./scripts/generate-releases-manifest.mjs

echo "--- :fastlane: Distributing Release Builds"
Expand Down
Loading