-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Various changes for Altinkaya workflow
- Loading branch information
Showing
3 changed files
with
76 additions
and
176 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
ARG codename=focal | ||
ARG codename=jammy | ||
|
||
FROM ubuntu:$codename | ||
ENV LANG=C.UTF-8 | ||
|
@@ -7,22 +7,22 @@ USER root | |
# Basic dependencies | ||
RUN apt-get update -qq \ | ||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq --no-install-recommends \ | ||
ca-certificates \ | ||
curl \ | ||
gettext \ | ||
git \ | ||
gnupg \ | ||
lsb-release \ | ||
software-properties-common \ | ||
expect-dev \ | ||
pipx | ||
ca-certificates \ | ||
curl \ | ||
gettext \ | ||
git \ | ||
gnupg \ | ||
lsb-release \ | ||
software-properties-common \ | ||
expect-dev \ | ||
pipx | ||
|
||
ENV PIPX_BIN_DIR=/usr/local/bin | ||
|
||
# Install wkhtml | ||
RUN case $(lsb_release -c -s) in \ | ||
focal) WKHTML_DEB_URL=https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.focal_amd64.deb ;; \ | ||
jammy) WKHTML_DEB_URL=https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox_0.12.6.1-2.jammy_amd64.deb ;; \ | ||
focal) WKHTML_DEB_URL=https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.focal_amd64.deb ;; \ | ||
jammy) WKHTML_DEB_URL=https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox_0.12.6.1-2.jammy_amd64.deb ;; \ | ||
esac \ | ||
&& curl -sSL $WKHTML_DEB_URL -o /tmp/wkhtml.deb \ | ||
&& apt-get update -qq \ | ||
|
@@ -31,10 +31,10 @@ RUN case $(lsb_release -c -s) in \ | |
|
||
# Install nodejs dependencies | ||
RUN case $(lsb_release -c -s) in \ | ||
focal) NODE_SOURCE="deb https://deb.nodesource.com/node_15.x focal main" \ | ||
&& curl -sSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - ;; \ | ||
jammy) NODE_SOURCE="deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" \ | ||
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg ;; \ | ||
focal) NODE_SOURCE="deb https://deb.nodesource.com/node_15.x focal main" \ | ||
&& curl -sSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - ;; \ | ||
jammy) NODE_SOURCE="deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" \ | ||
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg ;; \ | ||
esac \ | ||
&& echo "$NODE_SOURCE" | tee /etc/apt/sources.list.d/nodesource.list \ | ||
&& apt-get update -qq \ | ||
|
@@ -48,11 +48,11 @@ RUN curl -sSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - | |
&& apt-get update -qq \ | ||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq postgresql-client-12 | ||
|
||
# Install Google following Odoo's Runbot guideline https://github.com/odoo/runbot/blob/f8f435d468135486146a2e61e8d15d0f453c0e15/runbot/data/dockerfile_data.xml#L139-L140 | ||
RUN curl -sSL https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_126.0.6478.182-1_amd64.deb -o /tmp/chrome.deb \ | ||
&& apt-get update -qq \ | ||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends /tmp/chrome.deb \ | ||
&& rm /tmp/chrome.deb | ||
# # Install Google following Odoo's Runbot guideline https://github.com/odoo/runbot/blob/f8f435d468135486146a2e61e8d15d0f453c0e15/runbot/data/dockerfile_data.xml#L139-L140 | ||
# RUN curl -sSL https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_126.0.6478.182-1_amd64.deb -o /tmp/chrome.deb \ | ||
# && apt-get update -qq \ | ||
# && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends /tmp/chrome.deb \ | ||
# && rm /tmp/chrome.deb | ||
|
||
RUN add-apt-repository -y ppa:deadsnakes/ppa | ||
|
||
|
@@ -61,32 +61,32 @@ ARG python_version | |
# Install build dependencies for python libs commonly used by Odoo and OCA | ||
RUN apt-get update -qq \ | ||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq --no-install-recommends \ | ||
build-essential \ | ||
python${python_version}-dev \ | ||
python${python_version}-venv \ | ||
# we need python 3 for our helper scripts | ||
python3 \ | ||
python3-venv \ | ||
# for psycopg | ||
libpq-dev \ | ||
# for lxml | ||
libxml2-dev \ | ||
libxslt1-dev \ | ||
libz-dev \ | ||
libxmlsec1-dev \ | ||
# for python-ldap | ||
libldap2-dev \ | ||
libsasl2-dev \ | ||
# need libjpeg to build older pillow versions | ||
libjpeg-dev \ | ||
# for pycups | ||
libcups2-dev \ | ||
# for mysqlclient \ | ||
default-libmysqlclient-dev \ | ||
# some other build tools | ||
swig \ | ||
libffi-dev \ | ||
pkg-config | ||
build-essential \ | ||
python${python_version}-dev \ | ||
python${python_version}-venv \ | ||
# we need python 3 for our helper scripts | ||
python3 \ | ||
python3-venv \ | ||
# for psycopg | ||
libpq-dev \ | ||
# for lxml | ||
libxml2-dev \ | ||
libxslt1-dev \ | ||
libz-dev \ | ||
libxmlsec1-dev \ | ||
# for python-ldap | ||
libldap2-dev \ | ||
libsasl2-dev \ | ||
# need libjpeg to build older pillow versions | ||
libjpeg-dev \ | ||
# for pycups | ||
libcups2-dev \ | ||
# for mysqlclient \ | ||
default-libmysqlclient-dev \ | ||
# some other build tools | ||
swig \ | ||
libffi-dev \ | ||
pkg-config | ||
|
||
# We use manifestoo to check licenses, development status and list addons and dependencies | ||
RUN pipx install --pip-args="--no-cache-dir" "manifestoo>=0.3.1" | ||
|
@@ -108,34 +108,25 @@ ENV PATH=/opt/odoo-venv/bin:$PATH | |
|
||
ARG odoo_version | ||
|
||
# Install Odoo requirements (use ADD for correct layer caching). | ||
# We use requirements from OCB for easier maintenance of older versions. | ||
ADD https://raw.githubusercontent.com/OCA/OCB/$odoo_version/requirements.txt /tmp/ocb-requirements.txt | ||
# The sed command is to use the latest version of gevent and greenlet. The | ||
# latest version works with all versions of Odoo that we support here, and the | ||
# oldest pinned in Odoo's requirements.txt don't have wheels, and don't build | ||
# anymore with the latest cython. | ||
RUN sed -i -E "s/^(gevent|greenlet)==.*/\1/" /tmp/ocb-requirements.txt \ | ||
&& pip install --no-cache-dir \ | ||
-r /tmp/ocb-requirements.txt \ | ||
packaging | ||
|
||
# Install other test requirements. | ||
# - coverage | ||
# - websocket-client is required for Odoo browser tests | ||
RUN pip install --no-cache-dir \ | ||
coverage \ | ||
websocket-client | ||
|
||
# Install Odoo (use ADD for correct layer caching) | ||
ARG odoo_org_repo=odoo/odoo | ||
ADD https://api.github.com/repos/$odoo_org_repo/git/refs/heads/$odoo_version /tmp/odoo-version.json | ||
RUN mkdir /tmp/getodoo \ | ||
&& (curl -sSL https://github.com/$odoo_org_repo/tarball/$odoo_version | tar -C /tmp/getodoo -xz) \ | ||
&& mv /tmp/getodoo/* /opt/odoo \ | ||
&& rmdir /tmp/getodoo | ||
RUN pip install --no-cache-dir -e /opt/odoo \ | ||
&& pip list | ||
coverage \ | ||
websocket-client | ||
|
||
# yigit: We don't need to install odoo from github, we will use our own odoo version. | ||
|
||
# # Install Odoo (use ADD for correct layer caching) | ||
# ARG odoo_org_repo=odoo/odoo | ||
# ADD https://api.github.com/repos/$odoo_org_repo/git/refs/heads/$odoo_version /tmp/odoo-version.json | ||
# RUN mkdir /tmp/getodoo \ | ||
# && (curl -sSL https://github.com/$odoo_org_repo/tarball/$odoo_version | tar -C /tmp/getodoo -xz) \ | ||
# && mv /tmp/getodoo/* /opt/odoo \ | ||
# && rmdir /tmp/getodoo | ||
# RUN pip install --no-cache-dir -e /opt/odoo \ | ||
# && pip list | ||
|
||
# Make an empty odoo.cfg | ||
RUN echo "[options]" > /etc/odoo.cfg | ||
|
@@ -160,6 +151,6 @@ ENV ADDONS_DIR=. | |
ENV ADDONS_PATH=/opt/odoo/addons | ||
ENV INCLUDE= | ||
ENV EXCLUDE= | ||
ENV OCA_GIT_USER_NAME=oca-ci | ||
ENV OCA_GIT_USER_EMAIL=[email protected] | ||
ENV OCA_GIT_USER_NAME=altinkaya-bot | ||
ENV OCA_GIT_USER_EMAIL=[email protected] | ||
ENV OCA_ENABLE_CHECKLOG_ODOO= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters