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

Allow for different vets-website build targets in next-build #16782

Closed
1 of 2 tasks
Tracked by #17243 ...
tjheffner opened this issue Jan 9, 2024 · 1 comment
Closed
1 of 2 tasks
Tracked by #17243 ...

Allow for different vets-website build targets in next-build #16782

tjheffner opened this issue Jan 9, 2024 · 1 comment

Comments

@tjheffner
Copy link
Contributor

tjheffner commented Jan 9, 2024

Requirements

In #14974, we introduced vets-website assets to next-build. This uses the localhost build of vets-website. This is good, but we need to get different build types available for different environments, or testing locally. i.e --buildtype=vagovprod as seen in vets-website.

The available buildtype options for vets-website are:
localhost
vagovdev
vagovstaging
vagovprod

Acceptance criteria

Background & implementation details

The symlink setup will likely need to be adjusted, both locally and for different CI environments depending on the buildtype used. vets-website outputs to different directories based on the build type.

e.g. with localhost it outputs to vets-website/build/localhost/generated. With vagovprod, that directory updates to vets-website/build/vagovprod/generated.

next-build will need to source the assets from next-build/public/generated no matter the build type. We may need to re-build vets-website & move the assets vs symlinking directly to the generated output specific to localhost. This would have the side effect of adding vets-website build times to most of our local static builds. For my machine, that is 6 minutes of additional build time.

webpack 5.76.0 compiled with 2 warnings in 367955 ms
./script/../build/vagovprod/generated/vendor.entry.js -> ./script/../build/vagovprod/generated/shared-modules.entry.js
✨  Done in 372.31s.
@tjheffner
Copy link
Contributor Author

content-build downloads assets each run in this way, this is probably faster than doing a full vets-website build
https://github.com/department-of-veterans-affairs/content-build/blob/main/src/site/stages/build/plugins/download-assets.js
https://github.com/department-of-veterans-affairs/content-build/blob/main/src/site/constants/buckets.js

locally we would still want to symlink to the adjacent directory so local changes could be tested easily

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants