Open Mayank77maruti opened 1 day ago
Hi @Mayank77maruti , thanks for raising this issue.
There are a lot of different things, i'll try to answer to each one on separate comments below.
My main concern is that most of the challenges you describe are either not challenges for the Jenkins infra platform OR looks really subjective.
Please be aware of the context: this image is not aimed to be consumed somewhere else than in the Jenkins Infra platform.
Use ARG for Home Directory Instead of hardcoding /home/jenkins, we can use an ARG:
This makes no sense to me. Could you explain (without any help of any kind of LLM) a little bit?
What is the problem it aims to solve exactly?
Optimize ASDF Installation The ASDF installation could be more streamlined:
Same: why would be the purpose of streamlining? What problem does it solve?
Use --mount=type=cache for apt-get We can use caching for apt-get to speed up builds:
This would provide a gain of... 3s on a 4 min build. We build in a US East Azure datacenter: we are close to APT mirrors. It would also be a great way to have package not up to date: how do you invalidate the cache? Finally, be aware that the CI agents are ephemeral so no local cache...
Some RUN commands can be combined to reduce the number of layers:
Why? There are good reasons why we separate the RUN instructions:
What feature do you want to see added?
I've identified several opportunities to streamline the build process and improve overall performance. What Needs Improvement
Current Challenges
Proposed Solutions
Upstream changes
Combine RUN Commands:-
Some RUN commands can be combined to reduce the number of layers:
Use --mount=type=cache for apt-get We can use caching for apt-get to speed up builds:
Optimize ASDF Installation The ASDF installation could be more streamlined:
Use ARG for Home Directory Instead of hardcoding /home/jenkins, we can use an ARG: