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

chore(build): bring Netlify build back #2428

Closed

Conversation

asudoh
Copy link
Contributor

@asudoh asudoh commented May 9, 2019

GitHub workflow stuffs we are investigating may solve this problem space. This PR is a stop-gap approach until we make the idea in action - Which is, build deploy artifacts for each and collect them into a single directory so the index.html can refer to.

This also enables Netlify build for our React variant.

Refs #2406.

Changelog

New

  • Code to gather Netlify build for React.
  • Additional Rollup config for carbon-components Netlify build (some recent change may have made it required).

Testing / Reviewing

Testing should make sure our Netlify build is back working.

NOTE: The build took 7 mins which I hope is safe enough for US time, too.

@asudoh asudoh force-pushed the gather-deploy-files-react branch 2 times, most recently from 6408fe7 to a1c49f1 Compare May 9, 2019 07:17
GitHub workflow stuffs we are investigating may solve this problem
space. This PR is a stop-gap approach until we make the idea in action
- Which is, build deploy artifacts for each and collect them into a
single directory so the index.html can refer to.

This also enables Netlify build for our React variant.

Refs carbon-design-system#2406.
@asudoh asudoh force-pushed the gather-deploy-files-react branch from a1c49f1 to e729b15 Compare May 9, 2019 07:20
@asudoh asudoh marked this pull request as ready for review May 9, 2019 07:55
@@ -21,7 +21,7 @@
"format": "prettier --write '**/*.{js,md,scss,ts}' '!**/{build,es,lib,storybook,ts,umd,components}/**'",
"format:diff": "prettier --list-different '**/*.{js,md,scss,ts}' '!**/{build,es,lib,storybook,ts,umd,components}/**'",
"format:staged": "prettier --write",
"gather-deploy-files": "yarn workspaces run gather-deploy-files",
"gather-deploy-files": "yarn workspace carbon-components gather-deploy-files && yarn workspace carbon-components-react gather-deploy-files",
Copy link
Contributor

Choose a reason for hiding this comment

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

This can just be lerna run gather-deploy-files I believe right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great suggestion - Was looking for something similar, thanks @vpicone!

@joshblack
Copy link
Contributor

@asudoh unfortunately we'll run into the 15min build timeout that Netlify enforces if we build/deploy all packages in a PR. Most likely we'll need a way to trigger builds based on changed package directories.

@asudoh
Copy link
Contributor Author

asudoh commented May 9, 2019

@joshblack You are right - Given such 15min limit, this PR creates Netlify build for components/React only, as a stop-gap measure. (Update: And also limit dependent carbon-elements build considering the time limit) It took 7 mins in Japanese working hours and I think it's fast enough to meet 15mins limit in US working hours, too (when I think it's slightly busier).

@joshblack
Copy link
Contributor

joshblack commented May 9, 2019

@asudoh I'm not sure if you checked Slack, but I went ahead and pointed the old carbon apps to this repo instead of doing one build for everything 👍 Can see in: #2650 what the CI checks will be. Will not require us to do anything custom and can just use the same steps from before, with a little tweaks with lerna.

@asudoh
Copy link
Contributor Author

asudoh commented May 9, 2019

OK great thanks @joshblack for doing #2650! Will take a look

@joshblack
Copy link
Contributor

Closing this with the fix in #2650! 👍

@joshblack joshblack closed this May 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants