Netlify docs deployment#812
Conversation
Signed-off-by: Tihomir Jovicic <tihomir.jovicic.develop@gmail.com>
Signed-off-by: Tihomir Jovicic <tihomir.jovicic.develop@gmail.com>
|
✔️ Deploy Preview for devel-docs-dagger-io ready! 🔨 Explore the source changes: 9e2daf3 🔍 Inspect the deploy log: https://app.netlify.com/sites/devel-docs-dagger-io/deploys/60ed613a90e9290007032399 😎 Browse the preview: https://deploy-preview-812--devel-docs-dagger-io.netlify.app |
| @@ -0,0 +1,33 @@ | |||
| plan: | |||
There was a problem hiding this comment.
did you mean to include the docs-tiho environment in the PR?
There was a problem hiding this comment.
Ou, i haven't. I'll remove it.
We should fix the dependency installation before merging |
Signed-off-by: Tihomir Jovicic <tihomir.jovicic.develop@gmail.com>
I chatted briefly with @aluzzardi yesterday about this. It seems that the best solution is to include netlify's build image - however it seems to be over 800MB of layers... Not sure if there is a better way, I did not dig into it that much. @tjovicic do you mind looking into this? |
@samalba Sure, no problem. I can look into that. |
|
CI failure looks legit -- maybe there's a regression due to the upgrade of the netlify CLI |
Signed-off-by: Tihomir Jovicic <tihomir.jovicic.develop@gmail.com>
The
@aluzzardi I'm not sure, i've reverted the image bump change and it's still failing |
@samalba I've done some digging and there is no better way than including that netlify image. If we want to support npm, ruby, python... then I expect a giant image. But I'm not sure if it's worth it. Maybe just let user do the build part as a separate dagger step? |
I hear the downside (big image, it will be quite slow on first I see 3 options:
To do this, we could either provide 2 different components (e.g. This could be a good option, however, I think it's weird to use netlify without building with netlify (e.g. you get a different website depending on whether you build on your own or through netlify).
|
The problem seems to be here: That's what we do in Looks like |
That's weird because I haven't touch the tests or the netlify package... |
I understand. I wasn't a Netlify user before but now I understand that the build step is a popular feature among users. I can continue on with adding the build-image to our package. |
Yeah I don't get it either. Want me to take a look? |
Yeah, basically it's pretty much impossible to set up a Netlify project without build (unless you go through the API). So we have the assume the starting point is someone using Netlify alongside Netlify Build, wanting to move the process over to Dagger (for instance to have better control on when to deploy, like in this PR we want to deploy on every release). @samalba Any opinion on the 3 options (asking since you've implemented the build support)? |
|
I would go with option 2. Although it's not possible to deploy without build using the GUI. It's possible using the CLI. And it's also a valid use case. That way, if I don't rely on I think option 3 is a no-go given the extra maintenance work. Option 1 is ok. |
Yea, can you help me with that? |
After Sam has explained it so clearly, I would prefer option 2 also. |
Sure, will take a look
Let's do that then |
| netlify build | ||
|
|
||
| netlify deploy \ | ||
| --dir="$(pwd)" \ |
There was a problem hiding this comment.
This seems to be the problem that makes CI fail. I don't know why but putting --dir back fixes the issue.
|
@aluzzardi @samalba I've tried to create Build step using Netlify's build-image but I encountered 2 problems:
and then try to run I get I think they are either doing something with bash sessions or messing with $PATH. I've been doing this task for some time and the only way I see supporting Netlify build step is to have our own fork. What do you think? |
This should be doable on our end, something like
I see they're already setting up Basically something like this (taking the existing code with some small tweaks): So the only remaining part is Have you tried running the container manually, checking out We could either run the command with the full path, or inject a custom PATH, or something else |
|
Regarding the https://github.com/dagger/dagger/blob/main/stdlib/os/container.cue#L84 Which effectively overrides whatever @shykes Do you remember what was the reason behind override PATH? |
At the time, Dagger didn’t preserve metadata when pulling images, so I had to manually set I think we should keep that API, and either:
|
I think this breaks PATH, even if we took into account the metadata from fetchcontainer. Images deal with PATH in various ways, could be with ENV instructions, could be in the entrypoint or bashrc or other means. I think we should leave PATH alone and let the container do its own thing. If someone wants to append something to the path, the safest way is to do an |
|
I think that sets a bad precedent (“use Cue to configure all the things! Except this thing, don’t touch that”) but won’t argue any further. I’m fine either way. Also I don’t have a pressing need for it, and there is a pressing need to fix this issue, so we can always reopen later when/if someone asks for it. |
|
Closing this as it's stale. |
After lessons learned in #805, this is 2nd version of new docs deployment.