Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions chromium/chromium-update.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ RUN sudo apt-get update -q && sudo apt-get upgrade -qy
RUN cd /home/user/depot_tools \
&& git pull --rebase origin master

# Update and rebuild Chromium's source code.
RUN cd /home/user/chromium/src \
# Remove the parallelism limited Ninja alias and
# update and rebuild Chromium's source code.
RUN unalias ninja \
Copy link
Member

@jankeromnes jankeromnes May 22, 2018

Choose a reason for hiding this comment

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

Nit: I'm not sure it's necessary to have two different behaviors (normal developers use half of cores vs update Dockerfile uses all cores), so I don't think you need to unalias here. Also maybe we should remove the -j`nproc` ninja parameter below.

Copy link
Author

Choose a reason for hiding this comment

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

But then the image building will be slower, or is that not a concern?

Copy link
Member

@jankeromnes jankeromnes May 22, 2018

Choose a reason for hiding this comment

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

Actually, we import *-update.dockerfile into our admin interface, for when we want to update some project image by just building a few layers on top of it instead of pulling a brand new image (we stopped using *-update.dockerfile for most projects, but we still do it for Chrome, because we can't pre-build the Chrome browser in the main Dockerfile as it makes CircleCI time out, so we use the chromium-update.dockerfile to pre-build Chrome on-premises in OVH1).

And since the -j`nproc` was OOM'ing OVH1, I manually edited it to -j8 in our admin interface... So TL;DR we should only have one way to build Chrome, to be used everywhere by developers and CI alike.

&& cd /home/user/chromium/src \
&& git fetch origin \
&& git reset --hard origin/master \
&& gclient sync --delete --jobs=`nproc` \
Expand Down
5 changes: 4 additions & 1 deletion chromium/chromium.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ FROM janitortechnology/ubuntu-dev
RUN git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
ENV PATH $PATH:/home/user/depot_tools
RUN echo "\n# Add Chromium's depot_tools to the PATH." >> .bashrc \
&& echo "export PATH=\"\$PATH:/home/user/depot_tools\"" >> .bashrc
&& echo "export PATH=\"\$PATH:/home/user/depot_tools\"" >> .bashrc \
Copy link
Member

Choose a reason for hiding this comment

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

Nit: Please don't add this unnecessary final \.

Copy link
Author

@phistuck phistuck May 22, 2018

Choose a reason for hiding this comment

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

Why?

Kidding, that was a leftover of my first try (adding my line as an && here). Removing, of course.


# Make default Ninja parallelism use 8 parallel jobs.
RUN echo "\nalias ninja='ninja -j8'" >> .bash_aliases

# Enable bash completion for git cl.
RUN echo "\n# The next line enables bash completion for git cl." >> .bashrc \
Expand Down