Add tc-web front end to the monorepo
Categories
(Taskcluster :: Services, enhancement)
Tracking
(Not tracked)
People
(Reporter: owlish, Assigned: owlish)
References
Details
Attachments
(1 file)
64.74 KB,
image/png
|
Details |
Assignee | ||
Comment 1•6 years ago
|
||
Is this planned/not planned at all? Should I add tc-web to monorepo first and then add it to tc-builder or the other way around?
Comment 2•6 years ago
•
|
||
I don't think we should add it. taskcluster-web is not a node project, has react-specific linting and is not really a service/library. It is simply an application that uses the web-server service.
Assignee | ||
Comment 3•6 years ago
|
||
Awesome - thank you, Hassan!
Comment 4•6 years ago
|
||
Let's talk about this.. I'd like to see it in the monorepo, since it's shipped as part of the Taskcluster services, and tightly coupled to the services themselves. It will also need to have documentation built into it, and all that documentation is in the monorepo..
If we could include it in the repo, but in such a way that it is not part of the yarn workspace
, would that help?
Comment 5•6 years ago
|
||
Yes, that would definitely help. We can create a new directory and not include it in https://github.com/taskcluster/taskcluster/blob/73e7191cd95704f5e61c3e744d38e57570bccbc7/package.json#L10-L14. Irene, feel free to go for it. Hopefully it will makes things easier re: containerization :)
Comment 6•6 years ago
|
||
I'm assuming we can still hook up similar PR automation so that things are deployed to netlify for evaluation. If that's impossible, that's a strong reason to keep the repos separate (in which case maybe we can think about submodules or something..)
Assignee | ||
Comment 7•6 years ago
•
|
||
So, do I understand correctly that my tasks here would be to create a dir in the monorepo's root for the FE, copy the code over (probably still using Lerna? We want the commit history, don't we?) to there and try deploying from there to Netlify? Or, even wiser would be researching if we can automatically deploy it to Netlify when it's in the monorepo? <---- maybe you already know the answer to that, Hassan?
Comment 8•6 years ago
|
||
So, do I understand correctly that my tasks here would be to create a dir in the monorepo's root for the FE, copy the code over (probably still using Lerna? We want the commit history, don't we?)
Yes, a new directory should be created in the monorepo's root. I think using Lerna along with brian's scripts is fine to transfer the code.
Or, even wiser would be researching if we can automatically deploy it to Netlify when it's in the monorepo? <---- maybe you already know the answer to that, Hassan?
To deploy from a monorepo via netlify, I believe you can do the following:
- Move netlify.toml[1] to the root directory of the monorepo
- Amend netlify.toml with the build command and publish directory. This will make sure we don't do it anymore from the UI(see screenshot). In the top of the file, you can do:
# “base” is the directory to change to before starting build.
# “command” is your build command.
# “publish” is the directory to publish (relative to the root of your repo).
[build]
base = "site"
command = "build"
publish = "site/build"
Once the PR is merged, I will go ahead and change the netlify app to link to the monorepo.
[1] https://github.com/taskcluster/taskcluster-web/blob/master/netlify.toml
Assignee | ||
Comment 9•6 years ago
|
||
Awesome, thank you Hassan! I'll start working on this then
Assignee | ||
Updated•6 years ago
|
Comment 10•6 years ago
|
||
I think lerna does funny stuff with the package.json's, which we don't want here. When I imported tc-terraform, I did the following in the monorepo:
git fetch https://github.com/taskcluster/taskcluster-terraform
to pull the commit history from tc-terraformgit checkout -b taskcluster-terraform FETCH_HEAD
to check out a branch with just tc-terraform on itmkdir infrastructure/terraform && git mv * infrastructure/terraform
(or something like that) to move all of the files to the proper subdirectory, then committed- deleted stuff like CONTRIBUTING.md from
infrastructure/terraform
and committed git checkout -b bug1516353 master
to go back to the monorepo filesgit merge --allow-unrelated-histories taskcluster-terraform
to "merge" the tc-terraform branch, with this result.
Assignee | ||
Comment 11•6 years ago
|
||
Assignee | ||
Comment 12•6 years ago
|
||
Tomorrow Hassan will get tc-web from monorepo to work on Netlify, and then this bug can be closed
Comment 13•6 years ago
|
||
Done :)
Updated•6 years ago
|
Description
•