Skip to content

Commit cee7cc5

Browse files
committedSep 30, 2016
[REF] packaging: redhat: use fedora for testing
Creating a centos docker image fails on our nightly server with this issue: docker/hub-feedback#461 To create a centos image, we used another repository to host the image and we make it build in docker hub, then we pulled it. It was getting really annoying.
1 parent 01b69fb commit cee7cc5

File tree

2 files changed

+16
-17
lines changed

2 files changed

+16
-17
lines changed
 

‎setup/package.dfcentos ‎setup/package.dffedora

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
# Please note that this Dockerfile is used for testing nightly builds and should
22
# not be used to deploy Odoo
3-
FROM centos:centos7
3+
FROM fedora:24
44
MAINTAINER Odoo S.A. <info@odoo.com>
55

66
# Dependencies and postgres
7-
RUN yum install -d 0 -e 0 epel-release -y && \
8-
yum update -d 0 -e 0 -y && \
9-
yum install -d 0 -e 0 \
7+
RUN dnf update -d 0 -e 0 -y && \
8+
dnf install -d 0 -e 0 \
109
babel \
1110
libxslt-python \
1211
nodejs-less \
@@ -39,7 +38,7 @@ RUN yum install -d 0 -e 0 epel-release -y && \
3938
postgresql-libs \
4039
postgresql-contrib \
4140
postgresql-devel -y && \
42-
yum clean all
41+
dnf clean all
4342

4443
RUN easy_install pyPdf vatnumber pydot psycogreen suds ofxparse XlsxWriter
4544

‎setup/package.py

+12-12
Original file line numberDiff line numberDiff line change
@@ -291,11 +291,11 @@ def _prepare_testing(o):
291291
subprocess.call(["docker", "build", "-t", "odoo-%s-debian-nightly-tests" % version, "."],
292292
cwd=os.path.join(o.build_dir, "docker_debian"))
293293
if not o.no_rpm:
294-
subprocess.call(["mkdir", "docker_centos"], cwd=o.build_dir)
295-
subprocess.call(["cp", "package.dfcentos", os.path.join(o.build_dir, "docker_centos", "Dockerfile")],
294+
subprocess.call(["mkdir", "docker_fedora"], cwd=o.build_dir)
295+
subprocess.call(["cp", "package.dffedora", os.path.join(o.build_dir, "docker_fedora", "Dockerfile")],
296296
cwd=os.path.join(o.odoo_dir, "setup"))
297-
subprocess.call(["docker", "build", "-t", "odoo-%s-centos-nightly-tests" % version, "."],
298-
cwd=os.path.join(o.build_dir, "docker_centos"))
297+
subprocess.call(["docker", "build", "-t", "odoo-%s-fedora-nightly-tests" % version, "."],
298+
cwd=os.path.join(o.build_dir, "docker_fedora"))
299299

300300
def test_tgz(o):
301301
with docker('odoo-%s-src-nightly-tests' % version, o.build_dir, o.pub) as wheezy:
@@ -321,16 +321,16 @@ def test_deb(o):
321321
wheezy.system('su odoo -s /bin/bash -c "odoo -c /etc/odoo/openerp-server.conf -d mycompany &"')
322322

323323
def test_rpm(o):
324-
with docker('odoo-%s-centos-nightly-tests' % version, o.build_dir, o.pub) as centos7:
325-
centos7.release = '*.noarch.rpm'
324+
with docker('odoo-%s-fedora-nightly-tests' % version, o.build_dir, o.pub) as fedora24:
325+
fedora24.release = '*.noarch.rpm'
326326
# Start postgresql
327-
centos7.system('su postgres -c "/usr/bin/pg_ctl -D /var/lib/postgres/data start"')
328-
centos7.system('sleep 5')
329-
centos7.system('su postgres -c "createdb mycompany"')
327+
fedora24.system('su postgres -c "/usr/bin/pg_ctl -D /var/lib/postgres/data start"')
328+
fedora24.system('sleep 5')
329+
fedora24.system('su postgres -c "createdb mycompany"')
330330
# Odoo install
331-
centos7.system('yum install -d 0 -e 0 /opt/release/%s -y' % centos7.release)
332-
centos7.system('su odoo -s /bin/bash -c "odoo -c /etc/odoo/openerp-server.conf -d mycompany -i base --stop-after-init"')
333-
centos7.system('su odoo -s /bin/bash -c "odoo -c /etc/odoo/openerp-server.conf -d mycompany &"')
331+
fedora24.system('dnf install -d 0 -e 0 /opt/release/%s -y' % fedora24.release)
332+
fedora24.system('su odoo -s /bin/bash -c "odoo -c /etc/odoo/openerp-server.conf -d mycompany -i base --stop-after-init"')
333+
fedora24.system('su odoo -s /bin/bash -c "odoo -c /etc/odoo/openerp-server.conf -d mycompany &"')
334334

335335
def test_exe(o):
336336
KVMWinTestExe(o, o.vm_winxp_image, o.vm_winxp_ssh_key, o.vm_winxp_login).start()

0 commit comments

Comments
 (0)