Skip to content

Commit

Permalink
optimized builder images
Browse files Browse the repository at this point in the history
  • Loading branch information
rvalyi committed Aug 18, 2023
1 parent 4d85700 commit d769d30
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 53 deletions.
19 changes: 10 additions & 9 deletions 12.0/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,16 @@ RUN apk fix && \
RUN pip install PyYaml==5.3.1
RUN pip install git+https://github.com/akretion/ak

COPY repos.yml /root/.config/git-autoshare/repos.yml
RUN pip install git-autoshare git-aggregator
COPY bin/* /usr/local/bin/
RUN pip install git-aggregator
COPY install/* /install/

# pre-fetch the git-autoshare cache with the bare minimum:
# pre-fetch /odoo/src for CoW git-aggregator convergence atop of it.
ADD https://api.github.com/repos/odoo/odoo/git/refs/heads/12.0 version.json
RUN mkdir -p /root/.cache/git-autoshare/github.com/odoo && \
cd /root/.cache/git-autoshare/github.com/odoo && \
/usr/bin/git init --bare && \
/usr/bin/git fetch https://github.com/OCA/OCB.git refs/heads/12.0:refs/git-autoshare/oca/heads/12.0 --shallow-since=2018-10-01 && \
/usr/bin/git fetch https://github.com/odoo/odoo.git refs/heads/12.0:refs/git-autoshare/odoo/heads/12.0 --shallow-since=2018-10-01
RUN mkdir -p /odoo/src && \
cd /odoo/src && \
git init && \
git remote add odoo https://github.com/odoo/odoo && \
git fetch odoo 12.0 --filter=blob:none && \
git remote add oca https://github.com/oca/ocb && \
git fetch oca 12.0 && \
git checkout remotes/oca/12.0
19 changes: 10 additions & 9 deletions 13.0/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,16 @@ RUN apk fix && \
RUN pip install PyYaml==5.3.1
RUN pip install git+https://github.com/akretion/ak

COPY repos.yml /root/.config/git-autoshare/repos.yml
RUN pip install git-autoshare git-aggregator
COPY bin/* /usr/local/bin/
RUN pip install git-aggregator
COPY install/* /install/

# pre-fetch the git-autoshare cache with the bare minimum:
# pre-fetch /odoo/src for CoW git-aggregator convergence atop of it.
ADD https://api.github.com/repos/odoo/odoo/git/refs/heads/13.0 version.json
RUN mkdir -p /root/.cache/git-autoshare/github.com/odoo && \
cd /root/.cache/git-autoshare/github.com/odoo && \
/usr/bin/git init --bare && \
/usr/bin/git fetch https://github.com/OCA/OCB.git refs/heads/13.0:refs/git-autoshare/oca/heads/13.0 --shallow-since=2019-10-01 && \
/usr/bin/git fetch https://github.com/odoo/odoo.git refs/heads/13.0:refs/git-autoshare/odoo/heads/13.0 --shallow-since=2019-10-01
RUN mkdir -p /odoo/src && \
cd /odoo/src && \
git init && \
git remote add odoo https://github.com/odoo/odoo && \
git fetch odoo 13.0 --filter=blob:none && \
git remote add oca https://github.com/oca/ocb && \
git fetch oca 13.0 && \
git checkout remotes/oca/13.0
19 changes: 10 additions & 9 deletions 15.0/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,16 @@ RUN apk fix && \
RUN pip install PyYaml==5.3.1
RUN pip install git+https://github.com/akretion/ak

COPY repos.yml /root/.config/git-autoshare/repos.yml
RUN pip install git-autoshare git-aggregator
COPY bin/* /usr/local/bin/
RUN pip install git-aggregator
COPY install/* /install/

# pre-fetch the git-autoshare cache with the bare minimum:
# pre-fetch /odoo/src for CoW git-aggregator convergence atop of it.
ADD https://api.github.com/repos/odoo/odoo/git/refs/heads/15.0 version.json
RUN mkdir -p /root/.cache/git-autoshare/github.com/odoo && \
cd /root/.cache/git-autoshare/github.com/odoo && \
/usr/bin/git init --bare && \
/usr/bin/git fetch https://github.com/OCA/OCB.git refs/heads/15.0:refs/git-autoshare/oca/heads/15.0 --shallow-since=2021-10-01 && \
/usr/bin/git fetch https://github.com/odoo/odoo.git refs/heads/15.0:refs/git-autoshare/odoo/heads/15.0 --shallow-since=2021-10-01
RUN mkdir -p /odoo/src && \
cd /odoo/src && \
git init && \
git remote add odoo https://github.com/odoo/odoo && \
git fetch odoo 15.0 --filter=blob:none && \
git remote add oca https://github.com/oca/ocb && \
git fetch oca 15.0 && \
git checkout remotes/oca/15.0
19 changes: 10 additions & 9 deletions 16.0/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,16 @@ RUN apk fix && \
RUN pip install PyYaml==5.3.1
RUN pip install git+https://github.com/akretion/ak

COPY repos.yml /root/.config/git-autoshare/repos.yml
RUN pip install git-autoshare git-aggregator
COPY bin/* /usr/local/bin/
RUN pip install git-aggregator
COPY install/* /install/

# pre-fetch the git-autoshare cache with the bare minimum:
# pre-fetch /odoo/src for CoW git-aggregator convergence atop of it.
ADD https://api.github.com/repos/odoo/odoo/git/refs/heads/16.0 version.json
RUN mkdir -p /root/.cache/git-autoshare/github.com/odoo && \
cd /root/.cache/git-autoshare/github.com/odoo && \
/usr/bin/git init --bare && \
/usr/bin/git fetch https://github.com/OCA/OCB.git refs/heads/16.0:refs/git-autoshare/oca/heads/16.0 --shallow-since=2022-10-01 && \
/usr/bin/git fetch https://github.com/odoo/odoo.git refs/heads/16.0:refs/git-autoshare/odoo/heads/16.0 --shallow-since=2022-10-01
RUN mkdir -p /odoo/src && \
cd /odoo/src && \
git init && \
git remote add odoo https://github.com/odoo/odoo && \
git fetch odoo 16.0 --filter=blob:none && \
git remote add oca https://github.com/oca/ocb && \
git fetch oca 16.0 && \
git checkout remotes/oca/16.0
9 changes: 0 additions & 9 deletions bin/git

This file was deleted.

8 changes: 0 additions & 8 deletions repos.yml

This file was deleted.

0 comments on commit d769d30

Please sign in to comment.