Skip to content

Commit 7316888

Browse files
committed
[firefox-cinnabar] add a git-cinnabar checkout and docker image
1 parent 8029219 commit 7316888

3 files changed

Lines changed: 93 additions & 0 deletions

File tree

.circleci/config.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,20 @@ jobs:
5858
./.circleci/build_image.sh firefox/firefox-git.dockerfile janitortechnology/firefox
5959
no_output_timeout: 30m
6060

61+
firefox-cinnabar:
62+
docker:
63+
- image: docker:stable
64+
steps:
65+
- checkout
66+
- setup_remote_docker
67+
- attach_workspace:
68+
at: .
69+
- run:
70+
command: |
71+
docker load -i ubuntu-dev.tar
72+
./.circleci/build_image.sh firefox/firefox-cinnabar.dockerfile janitortechnology/firefox-cinnabar
73+
no_output_timeout: 30m
74+
6175
firefox-hg:
6276
docker:
6377
- image: docker:stable
@@ -142,6 +156,9 @@ workflows:
142156
- firefox-git:
143157
requires:
144158
- ubuntu-dev
159+
- firefox-cinnabar:
160+
requires:
161+
- ubuntu-dev
145162
- firefox-hg:
146163
requires:
147164
- ubuntu-dev
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
FROM janitortechnology/ubuntu-dev
2+
3+
# Install git-cinnabar.
4+
RUN git clone https://github.com/glandium/git-cinnabar /home/user/.git-cinnabar \
5+
&& /home/user/.git-cinnabar/git-cinnabar download \
6+
&& echo "\n# Add git-cinnabar to the PATH." >> /home/user/.bashrc \
7+
&& echo "PATH=\"\$PATH:/home/user/.git-cinnabar\"" >> /home/user/.bashrc
8+
ENV PATH $PATH:/home/user/.git-cinnabar
9+
10+
# Download Firefox's source code.
11+
RUN git -c cinnabar.clone=https://github.com/glandium/gecko clone hg::https://hg.mozilla.org/mozilla-unified /home/user/firefox
12+
WORKDIR /home/user/firefox
13+
14+
# Add Firefox build configuration.
15+
COPY --chown=user:user mozconfig /home/user/firefox/
16+
17+
# Install Firefox build dependencies.
18+
# One-line setup command from:
19+
# https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Linux_Prerequisites#Most_Distros_-_One_Line_Bootstrap_Command
20+
RUN sudo apt-get update \
21+
&& python python/mozboot/bin/bootstrap.py --no-interactive --application-choice=browser \
22+
&& sudo rm -rf /var/lib/apt/lists/*
23+
24+
# Set up Mercurial extensions for Firefox.
25+
RUN mkdir -p /home/user/.mozbuild \
26+
&& ./mach mercurial-setup -u \
27+
&& echo "\n# Add Mozilla's git commands to the PATH." >> /home/user/.bashrc \
28+
&& echo "PATH=\"\$PATH:/home/user/.mozbuild/version-control-tools/git/commands\"" >> /home/user/.bashrc
29+
30+
# Configure the IDEs to use Firefox's source directory as workspace.
31+
ENV WORKSPACE /home/user/firefox/
32+
33+
# Build Firefox.
34+
RUN ./mach build
35+
36+
# Configure Janitor for Firefox
37+
COPY --chown=user:user janitor-cinnabar.json /home/user/janitor.json

firefox/janitor-cinnabar.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"name": "Firefox (cinnabar)",
3+
"description": "The Firefox browser by Mozilla (Git-cinnabar checkout).",
4+
"icon": "https://janitor.technology/img/firefox.svg",
5+
"docker": {
6+
"image": "janitortechnology/firefox-cinnabar"
7+
},
8+
"ports": {
9+
"22": {
10+
"label": "SSH",
11+
"proxy": "none"
12+
},
13+
"8088": {
14+
"label": "VNC",
15+
"proxy": "https",
16+
"preview": true
17+
},
18+
"8089": {
19+
"label": "Cloud9",
20+
"proxy": "https"
21+
},
22+
"8090": {
23+
"label": "Theia",
24+
"proxy": "https"
25+
}
26+
},
27+
"scripts": {
28+
"Build Firefox": "./mach build",
29+
"Build faster": "./mach build faster",
30+
"Build binaries": "./mach build binaries",
31+
"Run Firefox": {
32+
"cmd": "./mach run",
33+
"openPort": "8088"
34+
},
35+
"Clobber build": "./mach clobber",
36+
"Update source code": "git pull --rebase origin master",
37+
"Send to code review (Phabricator)": "arc diff"
38+
}
39+
}

0 commit comments

Comments
 (0)