#1745  Build is very slow
Closed
Merlin Westphal opened 2 months ago

I recently tried to move from Woodpecker CI to OneDev. Setting up the CI/CD pipeline is very intuitive. Problem is, the building process of a docker image takes extremely long. When it ran about 10-20 minutes before, it takes OneDev more than an hour, no matter if I'm using the builtin agent or a dedicated docker agent.

A single yarn install sometimes takes over half an hour where locally it takes just a couple seconds.

As I'm using the same server I don't believe this has much to do with hardware. My server CPU is nowhere near being busy when the build is running. Is this a known problem or is there a quirk I don't know about to improve build speed?

Also I wasn't able to get multi-architecture builds to get up and running. If I specify multiple targets, it tells me it needs a different driver than the docker driver. This confused me because there is a little note below the custom buildx options telling me, multi-architecture builds are supported. I think I'm missing something here.

Thanks in advance!

Robin Shen commented 2 months ago

Please mount your project directory and run yarn install command inside the container directly from terminal without OneDev to see if it is still slow.

Robin Shen commented 2 months ago

As to multi-arch image, please refer to tutorial here to use a docker container driver instead of default docker driver:

https://docs.onedev.io/tutorials/cicd/multi-arch-docker-image#build-with-qemu

Merlin Westphal commented 2 months ago

Thanks for the quick reply. I realized that this had to do with an incorrect worker configuration (using a different worker with the wrong architecture). Sorry for the inconvenience!

Merlin Westphal changed state to 'Closed' 2 months ago
Previous Value Current Value
Open
Closed
issue 1 of 1
Type
Question
Priority
Normal
Assignee
Labels
No labels
Issue Votes (0)
Watchers (4)
Reference
onedev/server#1745
Please wait...
Page is in error, reload to recover